{"openapi":"3.0.1","info":{"title":"Lofty Service Open APIs","description":"Lofty service API description\n\n## Error status codes\n\nBy default many failed requests answer HTTP 200 with an error body such as `{\"code\": ..., \"message\": \"...\"}`. Send the header `X-Error-Status: true` to have such a failed request answer with a 4xx or 5xx status instead. Most endpoints keep the same body; a few return a more detailed error body that carries a `code`. Decide success or failure from the HTTP status, not the body shape. Endpoints that report an outcome in a field of a successful response (for example `\"success\": false`) still answer 200.","version":"1.0"},"servers":[{"url":"https://api.lofty.com"}],"tags":[{"name":"Tasks & Appointments V2","description":"Unified V2 API for lead tasks and appointments: list, create, read, update, finish, unfinish and delete. Tasks and appointments share the same taskId namespace; each endpoint resolves the target by ID regardless of underlying type."},{"name":"Opportunity","description":"Operations about opportunity"},{"name":"Communication V2","description":"Fetch a single communication record (text / email / call) by its communication ID. Closes the webhook follow-up gap where only list-by-lead endpoints existed for text and email."},{"name":"Saved Searches","description":"Read the property searches a lead has saved, together with how their listing alerts are delivered.\n\nA saved search and its listing alert are one object: the search conditions and the delivery cadence travel together.\n\n### Coverage\n\n`criteria` is a fixed field set: `locations` (cities, zipCodes, excludedZipCodes, counties, neighborhoods, subdivisions, communities, areas, schoolDistricts, elementarySchools, middleSchools, highSchools, streetNames, states, mapCircles, mapPath), priceMin/Max, soldPriceMin/Max, bedsMin/Max, bathsMin/Max, sqftMin/Max, lotSizeMin/Max, yearBuiltMin/Max, daysOnSite, daysSold, propertyTypes, propertySubTypes, listingStatuses, purchaseTypes, keywords and includeOpenHouse. Other filters a site offers, such as its Advanced Search filters (basement, adult community, waterfront, ...), cannot be written through the API yet: set them in the CRM alert editor, and later API updates keep them. On reads, filters this version does not model are listed by name in `unmappedCriteria`, so a partially understood search can be told apart from a fully mapped one. Values of unmapped filters are not returned.\n\nBesides the filters, two email settings can be read and written: `includeOpenHouseInfo` (show open house details in the email; not the same as the `criteria.includeOpenHouse` filter) and `useSupplement` (fill an email that has no new listing with matching ones already on the market).\n\n### Ignored fields\n\nCreate and update never fail because of a field they cannot apply. They save the rest and list each such field by its path in `ignoredFields`, next to the saved search: keys this API does not know or cannot write (`criteria.basement`, or `id` copied from a read), and `useSupplement` or `includeOpenHouseInfo` sent as true on a saved search they have no effect on. The list is empty when every field was applied. It is not the same as `unmappedCriteria`.\n\n### Pausing alerts\n\nA paused search keeps its conditions and schedule; only the emails stop. Pausing sets the cadence to NEVER, the same as choosing Never in the CRM, so a paused search reads back as `INACTIVE`, with the cadence it replaced in `frequencyBeforePause`; resume restores the same cadence. Alerts also stay silent while the lead is unsubscribed from property alerts, whatever the cadence.\n\n### Errors\n\nA request rejected by validation or by a business rule (missing or invalid field, duplicate search, recipient that is not the lead's, ...) answers HTTP 200 with `{\"code\": <error code>, \"message\": \"...\"}` instead of the saved search. Check `code` in the body rather than the HTTP status. Unknown ids answer HTTP 404 and leads the token user cannot see answer HTTP 403.\n\n| code | meaning |\n|---|---|\n| 20012 | A field is missing, invalid or not allowed; `message` names it |\n| 2000001 | A saved search of the lead already has the same filters |\n| 2000005 | The lead has no email address to send alerts to |\n| 2000011 | The saved search cannot be edited (created by the lead on the website) |\n| 100000 | Lofty could not complete the change; try again later |"},{"name":"Vendor","description":"Team vendor directory: team members, sub-accounts and associated agents within the caller's team."},{"name":"Mass Actions","description":"Bulk operations across many leads at once: mass SMS, mass email, bulk tag changes, bulk pipeline-stage changes. Each call creates an asynchronous plan and returns immediately - it does not wait for the sends/updates to complete."},{"name":"Lead Routing","description":"Lead routing configuration: read and update routing rules and default (supplement) rules per business type, and list the members and roles available for assignment."},{"name":"Lead Activity V2 API","description":"Unified lead activity timeline: returns call, text and email activities for a lead in chronological order, including both auto-captured and agent-logged entries."},{"name":"Site Audit","description":"Read the facts an audit of the caller's own Lofty website is made of: overview, site-level SEO settings, pages with their SEO fields, one page's raw templates, navigation structure, robots / sitemap files and third-party integrations. Every section is wrapped as `{section, siteId, generatedAt, partial, data}`; `partial` is true when a part of the section could not be fetched: a technical file, or a page whose live fetch failed (its fetchError says why). The API reports, it does not score: conclusions and advice are the caller's.\n\n### Access\n\nAvailable to website-only (Lofty Front) agents and to sites on the Full Website or Hyperlocal Website package. Other callers get HTTP 403 with code 403001. Every call works on the caller's primary website.\n\n### Errors\n\n| code | meaning |\n|---|---|\n| 400001 | A parameter is missing or invalid; `message` names it |\n| 403001 | The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package |\n| 404001 | The caller has no primary website |\n| 404003 | The page does not exist on the caller's site |\n| 100000 | The website service could not be reached (HTTP 502); retry later |\n| 502001 | The website service failed unexpectedly, for example a timeout while checking the site's pages (HTTP 502, the message is generic); retry later |"},{"name":"Tasks & Appointments","description":"Agent tasks and lead appointments. Supports listing a lead's appointments, listing / reading / creating / updating / deleting tasks on a lead."},{"name":"Sales Agents V2","description":"Sales Agent (AI Assistant): read-only observation plus lead assignment. List the Sales Agents the caller may use (their own and the team Sales Agent they borrow) and their lead capacity, see which Sales Agent works a lead, list the leads being worked, assign leads to a Sales Agent and stop it working a lead. Sales Agent settings cannot be changed through the API."},{"name":"Transactions V2","description":"V2 transaction APIs."},{"name":"Lead Manual Log","description":"Agent-recorded log of communications that happened outside the Lofty CRM (calls placed on a personal line, emails sent from another mailbox, SMS sent from another device). Three channels are supported: logCall, logEmail, logText. Direction fields are recorded from the agent's point of view: 'outbound' = agent -> lead, 'inbound' = lead -> agent. Persistence is asynchronous: a POST returns the new entry's ID once the write is enqueued, and the entry becomes readable after a short delay."},{"name":"Calls","description":"Calls placed or received through the Lofty dialer. Supports fetching a recording URL, retrieving a single call record, and listing calls attached to a lead."},{"name":"Agents V2","description":"Agent lifecycle management: deactivate an agent of the caller's team (frees the license seat, revokes sessions and tokens, keeps leads and data untouched) and reactivate a previously deactivated agent (re-occupies a seat and restores access without data loss). Deactivation is reversible and distinct from deletion."},{"name":"Agent User","description":"Agent onboarding and team directory operations. Create a new agent under the caller's team and attach tags to existing agents."},{"name":"Showings V2 API","description":"Create and maintain property showings on behalf of an integration partner: create a showing, list and read showings, reschedule, change status, cancel, and attach feedback.\n\nStatuses: requested, scheduled, in_progress, completed, denied, expired, cancelled. A showing created through the API keeps whatever status the partner last wrote - Lofty does not move it to in_progress / completed / expired by itself.\n\nOnly showings created by the calling partner can be updated, cancelled or given feedback; showings created inside Lofty or by another partner are read-only (200130).\n\nSubscribe to webhook event type 13 (Showing) to be notified of createdShowing, updatedShowing and createdShowingFeedback events."},{"name":"Calendar V2 API","description":"Unified V2 API for tasks and appointments on a lead: create, update, delete, finish, unfinish, query a paginated list, and find available meeting slots. Calendar IDs returned by POST /v2.0/calendar are composite strings of the form '<numericId>-task' or '<numericId>-appointment' and must be sent back as-is to the per-entry endpoints."},{"name":"Lead System Logs","description":"Query a lead's system log."},{"name":"Lead Transaction","description":"Operations about leads"},{"name":"Webhooks","description":"Use webhooks to be notified about events that happen in a lofty account.\n\nSupported webhook event types (listId):\n\n| listId | Event Type | Description |\n|--------|-----------|-------------|\n| 1 | Agent Info | Agent created or updated |\n| 2 | Lead Info | Lead created, updated, or deleted |\n| 3 | Lead Activity | Lead site activity (e.g. SiteBrowse, SiteFavorite, SiteSearch) |\n| 4 | Listing Alert | Listing alert changed |\n| 5 | Transaction | Transaction created, updated, or deleted |\n| 6 | Call | Call event (MANUAL and LOGGED only, excludes AUTO) |\n| 7 | Email | Email event (MANUAL and LOGGED only, excludes AUTO) |\n| 8 | Text | Text message event (MANUAL and LOGGED only, excludes AUTO) |\n| 9 | Note | Note created, updated, or deleted |\n| 10 | Task | Task created, updated, finished, or deleted |\n| 11 | Appointment | Appointment created, updated, finished, or deleted |\n| 12 | Pipeline Change | Lead pipeline stage changed |\n| 13 | Showing | Showing created, updated or cancelled; showing feedback added |\n\n### Notification Recipient Rules\n\nHere \"team\" means the entire Lofty client account (the organization), not the Lofty \"Team add-on\" product.\n\nWhich subscribed users receive a callback depends on the subscription's delivery mode (`permissionMode`). In both modes, only users in the lead's account (team) who have subscribed to the event type are considered.\n\n**Assignment-based delivery — `permissionMode: 0` (default)**\n\nA subscriber receives the callback only for leads assigned to them or that they administer:\n- If the lead is a **hidden lead**, only the **assigned agent** receives the notification.\n- Otherwise, the subscriber receives it if they are the **assigned agent** of the lead, or a **Company Owner** or **Company Admin**.\n- All other subscribers do **not** receive the notification.\n\n**Ownership-based delivery — `permissionMode: 1`**\n\nA subscriber receives the callback for any lead they manage, regardless of who it is assigned to:\n- Every assignment-based case above still applies (assigned agent, Company Owner / Company Admin).\n- In addition, the subscriber receives the callback for any lead within their **ownership scope** — a lead owned by their **team** or **office**, or **personally owned** by them — even if it is assigned to someone else.\n- Hidden leads are still delivered only to users who manage them.\n\nOwnership-based mode is intended for team/account-level integrations that must cover every lead in their scope, not only assigned leads. Set `permissionMode` when creating the subscription (POST /v1.0/webhook); it defaults to `0`, so existing subscriptions are unaffected.\n\n### Delivery Timing\n\nWebhooks are typically delivered within **1 minute** of the event being triggered. During periods of high traffic, delivery may be delayed, but will always be sent within **5 minutes**.\n\nFor detailed callback payload structures, see [Webhook Event Payloads](/docs/webhook-event-payloads).\n"},{"name":"Notifications V2","description":"Operations for sending notifications to agents"},{"name":"Notes","description":"Free-text notes attached to a lead. Supports create, list, get-by-id, update and delete. Notes may be pinned to surface them at the top of the lead's timeline. System-generated notes (automated activity) are included on the list endpoint only when explicitly requested."},{"name":"Listing","description":"Listing data access: retrieve published listings for a site feed (XML), and search active / sold listings by agent, office or MLS id."},{"name":"Intelligent Features","description":"AI-powered features for lead analysis and communication"},{"name":"Website","description":"Read and manage the caller's own Lofty website: the traffic report shown in the CRM, Feature Areas (AI-generated community pages) and page SEO settings. The site itself is read through the Site Audit API.\n\n### Access\n\nAvailable to website-only (Lofty Front) agents and to sites on the Full Website or Hyperlocal Website package. Website-only agents can read and write. For agents who are not website-only, a Full Website site can only read: creating a Feature Area or updating page SEO gets HTTP 403 with code 403004 and needs the Hyperlocal Website package. Other callers get HTTP 403 with code 403001. Every call works on the caller's primary website; the analytics endpoints also accept a `siteId` the caller owns.\n\n### Errors\n\n| code | meaning |\n|---|---|\n| 400001 | A parameter is missing or invalid; `message` names it |\n| 403001 | The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package |\n| 403002 | The `siteId` does not belong to the caller |\n| 403003 | A write was refused because the caller lacks the Edit Own Website permission |\n| 403004 | A write was refused because the caller is not a website-only agent and the site is on the Full Website package, which can only read; writes need the Hyperlocal Website package |\n| 404001 | The caller has no primary website |\n| 404002 | The Feature Area does not exist on the caller's site |\n| 422001 | The website refused the request (e.g. the area already exists or the limit is reached); `message` says why |\n| 501001 | The capability is not available yet |\n| 100000 | The website service could not be reached (HTTP 502); retry later |\n| 502001 | The website service failed unexpectedly; retry later |"},{"name":"Leads","description":"Lead lifecycle operations: create / read / update / delete a lead, search leads by stage, source, tag, create time or update time, place an inquiry or property on a lead, list lead activities, resolve assignee by lead info, and handle Brokermint contact callbacks."},{"name":"Members","description":"Team member directory: look up members by user ID, by account (email), or list all members of the caller's team. Also supports retrieving the current user's profile."},{"name":"Team Features","description":"Team-scoped metadata: lead tags, custom fields, and lead ponds. Supports listing existing entries, adding a new custom field, and retrieving a specific lead pond."},{"name":"Agent Organization","description":"Team organizational structure: read the caller's organization info, manage company and office records, and list permission profiles available to the team."},{"name":"Communication","description":"Lead communication history and outbound messaging: list call / email / text history for a lead, search communications for an agent, and send SMS or email to a lead."}],"paths":{"/v2.0/working-leads/{leadId}/stop":{"put":{"tags":["Sales Agents V2"],"summary":"Stop Sales Agent Working","description":"Stops the Sales Agent's automated follow-up on the specified lead, the same action as stopping it in the CRM (recorded as a manual stop by the caller). The response's 'success' field reports whether the request was accepted. To resume, assign the lead again with POST /v2.0/working-leads/assign; that takes a capacity slot again. Replaces PUT /v2.0/sales-agents/working-lead/{leadId}/mute, which still works with the same behavior and response.","operationId":"stopWorkingLead","parameters":[{"name":"leadId","in":"path","description":"Lead ID","required":true,"schema":{"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Stop operation completed. The response's 'success' field reports the outcome.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopWorkingLeadResultV2"}}}},"403":{"description":"Caller does not have access to this lead.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid lead ID parameter.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/website/pages/seo":{"put":{"tags":["Website"],"summary":"Update page SEO","description":"Changes the SEO title, meta description and/or keywords of 1-10 pages on the caller's website. Only the fields sent are changed. Values are raw templates: keep variables such as `{{Brand Name}}` as they are. Each page gets its own result: `updated` (with the raw values before and after), `not_found` (no such page on the site), `not_supported` (a shared neighborhood template page) or `failed`. Pages are not rolled back together.","operationId":"updatePageSeo","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsitePageSeoUpdateRequest"}}},"required":true},"responses":{"400":{"description":"No pages, more than 10, a repeated pageId, a page with nothing to change, a value that is too long, or a value containing `<`, `>` or `\"`."},"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success. `{results: [...]}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageSeoResponse"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's. For agents who are not website-only, a site on the Full Website package can only read: this write needs the Hyperlocal Website package (403004)."}}}},"/v2.0/tasks/{taskId}":{"get":{"tags":["Tasks & Appointments V2"],"summary":"Get Task","description":"Returns a single task or appointment by its ID. Tasks and appointments share the same taskId namespace; the endpoint resolves the target automatically.\n\nCaller must have manage permission on the task's lead.","operationId":"getTaskById","parameters":[{"name":"taskId","in":"path","description":"ID of the task or appointment to retrieve.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Task or appointment retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskV2SingleResponse"}}}},"400":{"description":"Caller has no access to the owning lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Task or appointment does not exist (TASK_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"put":{"tags":["Tasks & Appointments V2"],"summary":"Update Task","description":"Partially updates a task or appointment. Only non-null fields in the request body are applied.\n\nNotes:\n- To mark an entry as completed or not, use the finish / unfinish endpoints instead.\n- At least one of content, startAt, endAt, address must be supplied; an entirely empty payload returns 400 MISSING_PARAMETER.\n- Caller must have manage permission on the entry's lead.","operationId":"updateTask","parameters":[{"name":"taskId","in":"path","description":"ID of the task or appointment to update.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaskRequestV2"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid parameter (20012 INVALID_PARAMETER / MISSING_PARAMETER).","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Task or appointment does not exist (TASK_NOT_EXIST) or caller has no access to the lead (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Task updated. Response body is a simple message envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"delete":{"tags":["Tasks & Appointments V2"],"summary":"Delete Task","description":"Deletes a task or appointment by ID. Caller must have manage permission on the entry's lead.","operationId":"deleteTask","parameters":[{"name":"taskId","in":"path","description":"ID of the task or appointment to delete.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Entry deleted. Response body is a simple message envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"404":{"description":"Task or appointment does not exist (TASK_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/calendar/{calendarId}":{"get":{"tags":["Calendar V2 API"],"summary":"Get Calendar Event","description":"Returns a single Task or Appointment by its composite ID. Caller must have manage permission on the entry's lead.","operationId":"getCalendar","parameters":[{"name":"calendarId","in":"path","description":"Composite calendar ID of the form '<numericId>-task' or '<numericId>-appointment'.","required":true,"schema":{"type":"string"},"example":"12345-task"},{"name":"timeZoneCode","in":"query","description":"IANA timezone identifier for formatting start/end times. When omitted, the caller's configured timezone is used.","required":false,"schema":{"type":"string"},"example":"America/Los_Angeles"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Invalid calendarId format (20012 INVALID_PARAMETER); caller is not the manager (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"404":{"description":"No task or appointment exists for that id.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Calendar item retrieved. Response wraps a CalendarItemV2 under the 'data' key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarItemResponseEnvelope"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}},"put":{"tags":["Calendar V2 API"],"summary":"Update Calendar Event","description":"Partially updates a Task or Appointment. Only non-empty fields in the request body are applied; omitted fields keep their current values.\n\nNotes:\n- calendarId must be the composite string returned by POST /v2.0/calendar (e.g. '12345-task' or '12345-appointment'). Invalid format returns 400.\n- When startAt or endAt is supplied, it must be later than the current server time.","operationId":"updateCalendar","parameters":[{"name":"calendarId","in":"path","description":"Composite calendar ID returned by POST /v2.0/calendar, of the form '<numericId>-task' or '<numericId>-appointment'.","required":true,"schema":{"type":"string"},"example":"12345-task"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarUpdateRequestV2"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Calendar updated. Response body is a simple message envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarMessageResponseEnvelope"}}}},"400":{"description":"Invalid calendarId format, target not found, or invalid parameters (20012 INVALID_PARAMETER); caller is not the manager (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}},"delete":{"tags":["Calendar V2 API"],"summary":"Delete Calendar Event","description":"Deletes a Task or Appointment by its composite ID. The response body is a simple message envelope.","operationId":"deleteCalendar","parameters":[{"name":"calendarId","in":"path","description":"Composite calendar ID of the form '<numericId>-task' or '<numericId>-appointment'.","required":true,"schema":{"type":"string"},"example":"12345-task"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"200":{"description":"Calendar deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarMessageResponseEnvelope"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Invalid calendarId format or target not found (20012 INVALID_PARAMETER); caller is not the manager (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v1.0/tasks/{taskId}":{"get":{"tags":["Tasks & Appointments"],"summary":"Get Task (V1)","description":"Returns a single task by its ID, along with the lead's pipeline context. Caller must have manage permission on the lead that owns the task.","operationId":"getTaskById_1","parameters":[{"name":"taskId","in":"path","description":"ID of the task to retrieve.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Caller has no access to the lead that owns the task (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Task does not exist or has been deleted (TASK_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Task retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskSingleResponse"}}}}}},"put":{"tags":["Tasks & Appointments"],"summary":"Update Task (V1)","description":"Partially updates an existing task. Fields not supplied are left unchanged.\n\nNotes:\n- When finishFlag is true, the task is marked completed and all other fields are ignored. Completion is rejected for smart-plan tasks (TASK_IS_SMARTPLAN).\n- When leadId is supplied, it must match the task's existing lead; otherwise 400 INVALID_UPDATE_OPERATION_LEADID.\n- At least one field must be supplied; an entirely empty payload returns 400 MISSING_PARAMETER.\n- Caller must have manage permission on the task's lead.\n- The response body is empty.","operationId":"updateTask_1","parameters":[{"name":"taskId","in":"path","description":"ID of the task to update.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRequest"}}},"required":true},"responses":{"404":{"description":"Task does not exist (TASK_NOT_EXIST) or caller lacks access to the lead (20006 LEAD_NOT_EXIST)."},"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Task updated successfully. No response body."},"400":{"description":"Missing or invalid parameter (20012 INVALID_PARAMETER / MISSING_PARAMETER), finish attempted on a smart-plan task (TASK_IS_SMARTPLAN), or leadId does not match the task's lead (INVALID_UPDATE_OPERATION_LEADID)."},"500":{"description":"Internal server error."}}},"delete":{"tags":["Tasks & Appointments"],"summary":"Delete Task (V1)","description":"Deletes a task by ID. Caller must have manage permission on the task's lead. The response body is empty.","operationId":"deleteTask_1","parameters":[{"name":"taskId","in":"path","description":"ID of the task to delete.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"404":{"description":"Task does not exist (TASK_NOT_EXIST) or caller lacks access to the lead (20006 LEAD_NOT_EXIST)."},"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Task deleted successfully. No response body."},"500":{"description":"Internal server error."}}}},"/v1.0/routing/rule/{type}":{"put":{"tags":["Lead Routing"],"summary":"Update a routing rule","description":"Updates a routing rule identified by its ID. Validates activeHours and routingStrategy:\n\n- activeDays: list of 1-7; deduplicated and sorted server-side.\n- hoursStart / hoursEnd: each in [0, 23].\n- routingStrategy.strategyType must match the business type. LEAD_POND is only allowed for AGENT_LEAD; NEXT_UP and BLAST_ALERT are not allowed for ASSISTANT_LEAD.\n- memberWeights must reference valid members in the team.\n- touchMinutes must be in (0, 1440]; when > 60, must be an integer multiple of 60.\n\nCaller must have MANAGE_LEAD_DISTRIBUTION or MANAGE_LEAD_DISTRIBUTION_DEPARTMENT permission.","operationId":"editRule","parameters":[{"name":"type","in":"path","description":"Routing business type.","required":true,"schema":{"type":"integer","format":"int32","enum":["1","2","4"]},"example":1},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRuleRequest"}}},"required":true},"responses":{"400":{"description":"Invalid input or permission denied. Business codes include PERMISSION_DENIED (20017), INVAID_ID, BUSINESS_TYPE_ERROR, STRATEGY_TYPE_ERROR, STRATEGY_TYPE_NOT_MATCH, INVAID_ACTIVE_DAY, INVAID_ACTIVE_HOURS, INVAID_MEMBER_WEIGHT, INVAID_GROUP_ID, INVAID_TOUCHMINUTES.","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Rule updated.","content":{"application/json":{"schema":{"type":"string","example":"ok"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/routing/rule/supplement/{type}":{"get":{"tags":["Lead Routing"],"summary":"Get default (supplement) routing rule","description":"Returns the default / fallback routing rule configured on the caller's team for the given business type. Caller must have MANAGE_LEAD_DISTRIBUTION or MANAGE_LEAD_DISTRIBUTION_DEPARTMENT permission.","operationId":"getSupplementRule","parameters":[{"name":"type","in":"path","description":"Routing business type.","required":true,"schema":{"type":"integer","format":"int32","enum":["1","2","4"]},"example":1},{"name":"roleId","in":"query","description":"Role ID. Required when type = 4 (ASSISTANT_LEAD).","required":false,"schema":{"type":"integer","format":"int32","default":-1},"example":101},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid type or roleId, or permission denied. Business codes include PERMISSION_DENIED (20017), BUSINESS_TYPE_ERROR, INVAID_ROLE_ID.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Default routing rule for the given business type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplementRoutingRule"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"put":{"tags":["Lead Routing"],"summary":"Update default (supplement) routing rule","description":"Updates the default / fallback routing rule for the given business type.\n\nNotes:\n- BLAST_ALERT and Next_Up strategies are not allowed for ASSISTANT_LEAD.\n- When strategyType = DEFAULT_ASSIGNEE and type = AGENT_LEAD, exactly one of assigneeAgentId or assigneeGroupId must be supplied.\n- For non-DEFAULT_ASSIGNEE strategies, touchMinutes must be in (0, 1440] and, when > 60, an integer multiple of 60.\n\nCaller must have MANAGE_LEAD_DISTRIBUTION or MANAGE_LEAD_DISTRIBUTION_DEPARTMENT permission.","operationId":"editSupplementRule","parameters":[{"name":"type","in":"path","description":"Routing business type.","required":true,"schema":{"type":"integer","format":"int32","enum":["1","2","4"]},"example":1},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplementRoutingRuleRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input or permission denied. Business codes include PERMISSION_DENIED (20017), STRATEGY_TYPE_ERROR, STRATEGY_TYPE_NOT_MATCH, INVAID_ID, INVAID_ROLE_ID, INVAID_TOUCHMINUTES.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Rule updated.","content":{"application/json":{"schema":{"type":"string","example":"ok"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/org/office":{"put":{"tags":["Agent Organization"],"summary":"Add Office","description":"Creates a new office (organizational sub-unit) under the caller's team. Caller must have permission to manage team organization.","operationId":"addOffice","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Envelope with business code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOpResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameter or permission denied.","content":{"application/json":{"schema":{"type":"string"}}}}}},"post":{"tags":["Agent Organization"],"summary":"Update Office","description":"Updates an existing office under the caller's team. Caller must have permission to manage team organization.","operationId":"updateOffice","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Envelope with business code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOpResponse"}}}},"404":{"description":"Office does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameter or permission denied.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/notes/{noteId}":{"get":{"tags":["Notes"],"summary":"Get a note by ID","description":"Returns a single note, including its text content, by its ID. The note must belong to a lead visible to the caller.","operationId":"getNoteByNoteId","parameters":[{"name":"noteId","in":"path","description":"ID of the note to retrieve.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":400000012345},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Note retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteSingleResponse"}}}},"404":{"description":"Note does not exist or is not accessible (20007 RESOURCE_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"put":{"tags":["Notes"],"summary":"Edit/Update Note","description":"Edits (updates) the content and pin state of an existing note.\n\nNotes:\n- content must not be blank; isPin must not be null.\n- content is silently truncated to 2000 characters.\n- If leadId is supplied in the body, it must match the note's lead; otherwise 400 INVALID_UPDATE_OPERATION_LEADID.\n- Caller must have access to the lead; otherwise 404 LEAD_NOT_EXIST.\n- The response body is empty.","operationId":"update","parameters":[{"name":"noteId","in":"path","description":"ID of the note to update.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":400000012345},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token."},"404":{"description":"Note does not exist (20007 RESOURCE_NOT_EXIST) or lead is not accessible (20006 LEAD_NOT_EXIST)."},"200":{"description":"Note updated successfully. No response body."},"500":{"description":"Internal server error."},"400":{"description":"Missing or invalid parameter (20012 INVALID_PARAMETER), or the supplied leadId does not match the note's lead (INVALID_UPDATE_OPERATION_LEADID)."}}},"delete":{"tags":["Notes"],"summary":"Delete Note","description":"Deletes a note by ID. Caller must have manage permission on the lead that owns the note. The response body is empty.","operationId":"delete_1","parameters":[{"name":"noteId","in":"path","description":"ID of the note to delete.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":400000012345},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token."},"404":{"description":"Note does not exist (20007 RESOURCE_NOT_EXIST) or lead is not accessible (20006 LEAD_NOT_EXIST)."},"200":{"description":"Note deleted successfully. No response body."},"500":{"description":"Internal server error."}}}},"/v1.0/leads/{leadId}":{"get":{"tags":["Leads"],"summary":"Get Lead","description":"Returns a single lead by its ID. The response is wrapped under the 'lead' key.\n\nNotes:\n- By default, trashed leads are not returned. Pass withTrash=true to include them.\n- Caller must have access to the lead; otherwise 404 LEAD_NOT_EXIST.","operationId":"get_1","parameters":[{"name":"leadId","in":"path","description":"ID of the lead to retrieve.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"withTrash","in":"query","description":"When true, include trashed leads in the lookup.","required":false,"schema":{"type":"boolean","default":false},"example":false},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Lead retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}}},"404":{"description":"Lead does not exist or is not accessible (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"put":{"tags":["Leads"],"summary":"Update Lead","description":"Updates an existing lead. Caller must have manage permission on the lead.\n\n## Lead Pond\n\nSet `pondId` to move the lead into a lead pond after the update is applied; the pond replaces the agent assignee. Use a pond ID returned by `GET /v1.0/team-features/lead-ponds`. `pondId` cannot be combined with `assignedUserId` or `deduplicate=true`. The move is applied asynchronously. If the update succeeds but the pond move fails, the call returns 500 with 200143 LEAD_POND_ASSIGN_FAILED: the other fields are already saved, and resending the same request is safe.\n\n## Property block\n\nIf the request body carries a `property` block, it is persisted alongside the lead update with the same semantics as `POST /v1.0/leads/{leadId}/property`:\n\n- **`property.id` omitted or `<= 0`** — merge with an existing property by address; if no match, create a new property record. (Prior versions of this endpoint rejected this case with `UPDATE_LEAD_PROPERTY_FAILED`; that restriction has been lifted.)\n- **`property.id > 0`** — update the named property in place. The property must belong to this lead (its `leadUserId` must match); otherwise the request is rejected with 200108 LEAD_PROPERTY_NOT_EXIST.\n\nValidation:\n- When a `property` block is supplied, at least one of `city`, `state`, `zipCode`, `streetAddress` must be non-blank; otherwise 200057 PROPERTY_ADDRESS_EMPTY is returned (the lead update is also aborted).","operationId":"update_1","parameters":[{"name":"leadId","in":"path","description":"ID of the lead to update.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"deduplicate","in":"query","description":"Defaults to false: the lead is updated in place. Pass true to also deduplicate: if another lead in the same team shares this lead's email after the update, this lead is merged into that lead (and this lead is deleted).","required":false,"schema":{"type":"boolean","default":false}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditLeadRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist or is not accessible (20006 LEAD_NOT_EXIST); supplied `property.id` does not belong to this lead (200108 LEAD_PROPERTY_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters (20012 INVALID_PARAMETER); `property` block supplied with every address field blank (200057 PROPERTY_ADDRESS_EMPTY); `pondId` not available to the caller (200140 LEAD_POND_NOT_AVAILABLE); `pondId` combined with `assignedUserId` (200141 LEAD_POND_ASSIGNEE_CONFLICT) or with `deduplicate=true` (200142 LEAD_POND_DEDUPLICATE_CONFLICT).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Lead updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIdResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"delete":{"tags":["Leads"],"summary":"Delete Lead","description":"Moves a lead to the trash. A reason is required and is recorded for audit. The response body is empty.","operationId":"trash","parameters":[{"name":"leadId","in":"path","description":"ID of the lead to trash.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"reason","in":"query","description":"Free-text reason recorded with the trash operation.","required":true,"schema":{"type":"string"},"example":"Duplicate contact"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token."},"400":{"description":"reason missing (20012 INVALID_PARAMETER); the user behind the token may not delete this lead (20017 PERMISSION_DENIED)."},"200":{"description":"Lead trashed.","content":{"application/json":{"schema":{"type":"object","example":{"deleted":true,"leadId":"651095960136641"}}}}},"404":{"description":"Lead does not exist or is not accessible (20006 LEAD_NOT_EXIST)."},"500":{"description":"Internal server error."}}}},"/v1.0/leads/{leadId}/transaction/{transactionId}":{"get":{"tags":["Lead Transaction"],"summary":"Get Transaction","description":"Fetches a single transaction that belongs to the given lead.\n\nPrerequisites:\n- leadId must be manageable by the caller; otherwise 404 LEAD_NOT_EXIST.\n- transactionId must exist, not be deleted, AND belong to leadId; otherwise 404 TRANSACTION_NOT_EXIST. For security, cross-lead transactionIds are treated as 'not exist' rather than 'forbidden'.","operationId":"getTransactionsByTransactionId","parameters":[{"name":"leadId","in":"path","description":"Lead ID. Must be manageable by the caller.","required":true,"schema":{"type":"integer","format":"int64"},"example":100001},{"name":"transactionId","in":"path","description":"Transaction ID. Must exist and be bound to leadId.","required":true,"schema":{"type":"integer","format":"int64"},"example":10001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"The requested transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTransaction"}}}},"404":{"description":"Lead not manageable (20006 LEAD_NOT_EXIST), or transaction not found / not bound to leadId (200060 TRANSACTION_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"put":{"tags":["Lead Transaction"],"summary":"Update Transaction","description":"Partially updates an existing transaction. Only supplied fields are applied; omitted fields remain unchanged. `transactionStatus` is writable: supply the stage's display name exactly as it appears in the team's transaction pipeline for the given `transactionType` (case-insensitive, e.g. \"Under Contract\"). A status name that matches no stage in that pipeline is rejected (200125); omit the field to keep the current status.","operationId":"updateTransaction","parameters":[{"name":"leadId","in":"path","description":"Lead ID. Must be manageable by the caller.","required":true,"schema":{"type":"integer","format":"int64"},"example":100001},{"name":"transactionId","in":"path","description":"Transaction ID. Must exist and be bound to leadId.","required":true,"schema":{"type":"integer","format":"int64"},"example":10001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTransaction"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Commission validation failure (20012 INVALID_PARAMETER, with the raw validation message in the body), or transactionStatus does not match any stage in the transaction pipeline for the given transactionType (200125 TRANSACTION_STATUS_INVALID).","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead not manageable (20006 LEAD_NOT_EXIST) or transaction not found / not bound to leadId (200060 TRANSACTION_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Transaction updated. The response is the merged transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTransaction"}}}}}}},"/v1.0/leads/{leadId}/savedSearches/{savedSearchId}":{"put":{"tags":["Saved Searches"],"summary":"Update a lead's existing property alert or market snapshot","description":"Changes the locations, price range, bedrooms, email frequency, schedule or recipients of an existing property alert or market snapshot (saved search) in place. Only the fields sent are changed; omitted fields keep their values. criteria, when sent, replaces every filter the API can write, and filters it cannot write are kept. A paused search stays paused unless alertFrequency is sent. Searches the lead created on the website cannot be edited. Returns the search as stored, and in ignoredFields the request fields that were not applied.\n\nname, when sent, must be 1-255 characters.\n\nThe rules of each filter are on the criteria fields; how schedule follows a changed alertFrequency is on the schedule field.","operationId":"updateSavedSearch","parameters":[{"name":"leadId","in":"path","description":"ID of the lead the saved search belongs to.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"savedSearchId","in":"path","description":"ID of the saved search to update.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":88123456789},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchWriteRequest"},"examples":{"changeFilters":{"summary":"Rename and change the filters; other fields stay as they are","description":"changeFilters","value":{"name":"San Jose 3BR under 1.3M","criteria":{"locations":{"cities":["San Jose, CA","Campbell, CA"]},"priceMax":1300000,"bedsMin":3}}},"changeFrequency":{"summary":"Only change how often the emails go out","description":"changeFrequency","value":{"alertFrequency":"WEEKLY","schedule":{"FRI":"AM"}}}}}},"required":true},"responses":{"403":{"description":"The token user cannot access this lead"},"404":{"description":"The saved search is not one of this lead's"},"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}}}},"delete":{"tags":["Saved Searches"],"summary":"Delete a lead's property alert or market snapshot","description":"Deletes the saved search and stops its emails for good. To stop the emails but keep the search, use the pause endpoint instead.","operationId":"deleteSavedSearch","parameters":[{"name":"leadId","in":"path","description":"ID of the lead the saved search belongs to.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"savedSearchId","in":"path","description":"ID of the saved search to delete.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":88123456789},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"403":{"description":"The token user cannot access this lead"},"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchDeleteResponse"}}}},"404":{"description":"The saved search is not one of this lead's"}}}},"/v1.0/brokermint/transaction":{"put":{"tags":["Lead Transaction"],"summary":"Brokermint — Sync Transaction","description":"Callback endpoint for Brokermint integration to sync transaction updates into Lofty.\n\nThe transaction must be linked to Brokermint via the Lofty UI before this endpoint can update it. See the request body schema for supported fields.","operationId":"updateTransactionFromBrokermint","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingTransaction"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Envelope {code, message}. code=0 indicates applied; code=200060 indicates the transaction was not found (either the Brokermint link is missing or the transaction was deleted). HTTP status is 200 in both cases.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCallbackResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/brokermint/lead":{"put":{"tags":["Leads"],"summary":"Brokermint — Sync Lead","description":"Callback endpoint for Brokermint to push contact updates into Lofty. Not intended for general external callers.\n\nThe target contact must have been previously linked to a Brokermint record through the Lofty UI's Brokermint Integration. Without this link the response body contains a non-zero code despite HTTP 200.","operationId":"updateContacts","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contacts"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Brokermint contact synced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponse"}}}}}}},"/v2.0/working-leads/assign":{"post":{"tags":["Sales Agents V2"],"summary":"Assign Lead to Sales Agent","description":"Hands leads to a Sales Agent, lead by lead; the only Sales Agent endpoint that uses capacity. Without salesAgent each lead goes by ownership: a team lead to the team Sales Agent, a personal lead to the personal one. With salesAgent (personal or team) each lead not yet worked goes to that Sales Agent; if the caller has no such Sales Agent the whole request is refused with 400. A lead already being worked counts as succeeded (alreadyWorking true), uses no capacity and stays with the Sales Agent working it, even when salesAgent names another one: the succeeded entry names the Sales Agent actually working the lead. Assigning a stopped lead again takes a capacity slot again, like a new lead. Failed leads carry one of these reason codes: QUOTA_EXCEEDED, NO_SEAT, SALES_AGENT_NOT_AVAILABLE, LEAD_NOT_FOUND, NO_ACCESS, DO_NOT_CONTACT, SAME_PHONE_LEAD_FOLLOWING, INTERNAL_ERROR. Rate limited to 30 requests per account, 60 per client IP and 1000 across all callers every 60 seconds (429 with Retry-After beyond any of them). When the rate limit cannot be checked the request is refused with 503 and no lead is assigned; retry later.","operationId":"assignWorkingLeads","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignWorkingLeadsRequestV2"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters (no lead IDs, more than 100, a non-positive ID, an unknown salesAgent, or a salesAgent the caller does not have).","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Over a rate limit (30 requests per account, 60 per client IP and 1000 across all callers every 60 seconds); see Retry-After.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Assign completed; check succeededLeads and failedLeads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignWorkingLeadsResultV2"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"503":{"description":"The rate limit cannot be checked right now; nothing was assigned. Retry later.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/website/featureAreas":{"get":{"tags":["Website"],"summary":"List Feature Areas","description":"The Feature Areas (community pages) on the caller's primary website, newest first: name, location, type and how many sub-pages each has.","operationId":"listFeatureAreas","parameters":[{"name":"page","in":"query","description":"Page number, from 1.","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"size","in":"query","description":"Page size, 1-100.","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success. `{page, size, total, items}`.","content":{"application/json":{}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}},"post":{"tags":["Website"],"summary":"Create a Feature Area","description":"Adds one neighborhood or city to the caller's website as a Feature Area. Lofty generates its intro with AI (takes several seconds) and creates its intro, listing-search and market pages; detail and FAQ content and the cover picture are generated afterwards. Fails with 422001 when the same area already exists or the site has reached its Feature Area limit.","operationId":"createFeatureArea","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteFeatureAreaCreateRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success. `{items: [...]}` with the created Feature Area.","content":{"application/json":{}}},"400":{"description":"Invalid type or missing city / neighborhood."},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's. For agents who are not website-only, a site on the Full Website package can only read: this write needs the Hyperlocal Website package (403004)."}}}},"/v2.0/tasks":{"get":{"tags":["Tasks & Appointments V2"],"summary":"List Tasks","description":"Returns all tasks and appointments attached to the given lead. Caller must have manage permission on the lead.","operationId":"listTask","parameters":[{"name":"leadId","in":"query","description":"ID of the lead whose tasks and appointments to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Tasks and appointments for the lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskV2ListResponse"}}}},"400":{"description":"Caller has no access to the lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"post":{"tags":["Tasks & Appointments V2"],"summary":"Create Task","description":"Creates a new follow-up task or appointment on the target lead. Whether an appointment or a regular task is created depends on the payload's type field.\n\nNotes:\n- content, assignedRole, leadId and endAt are required.\n- Caller must have manage permission on the lead.\n- The response contains only the new entry's ID under the 'taskId' key.","operationId":"addTask","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRequestV2"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Task or appointment created. Response contains the new entry's ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskV2IdResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid parameter (20012 INVALID_PARAMETER), or caller has no access to the lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/tasks/{taskId}/unfinish":{"post":{"tags":["Tasks & Appointments V2"],"summary":"Unfinish Task","description":"Reopens a task or appointment, reverting it to the not-finished state - the opposite of Finish Task. Caller must have manage permission on the entry's lead.","operationId":"unfinishTask","parameters":[{"name":"taskId","in":"path","description":"ID of the task or appointment to revert to not-completed.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Task or appointment does not exist (TASK_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Entry marked as not completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}}}},"/v2.0/tasks/{taskId}/finish":{"post":{"tags":["Tasks & Appointments V2"],"summary":"Finish Task","description":"Marks a task or appointment as completed. Caller must have manage permission on the entry's lead. Smart-plan tasks cannot be finished through this endpoint (TASK_IS_SMARTPLAN).","operationId":"finishTask","parameters":[{"name":"taskId","in":"path","description":"ID of the task or appointment to finish.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Entry marked as completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"Finish attempted on a smart-plan task (TASK_IS_SMARTPLAN).","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Task or appointment does not exist (TASK_NOT_EXIST) or caller has no access to the lead (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/showings":{"get":{"tags":["Showings V2 API"],"summary":"List Showings","description":"Returns a page of showings visible to the caller - showings the caller booked plus showings on listings where the caller is the listing contact - optionally filtered by lead, status, start-time range or the partner's externalId. Ordered by start time, newest first. With includeShowingRequests=true, the requests a lead raised on the agent's website are merged in as read-only entries with type showing_request; their ids are a separate sequence and are not accepted by the other showing endpoints.","operationId":"query","parameters":[{"name":"leadId","in":"query","description":"Restrict to one lead.","required":false,"schema":{"type":"string","description":"Restrict to one lead.","example":563172647619608},"example":563172647619608},{"name":"externalId","in":"query","description":"Restrict to the showing the calling partner created under this externalId.","required":false,"schema":{"type":"string","description":"Restrict to the showing the calling partner created under this externalId.","example":"showami-98765"},"example":"showami-98765"},{"name":"status","in":"query","description":"Restrict to one status.","required":false,"schema":{"type":"string","description":"Restrict to one status.","example":"scheduled","enum":["requested","scheduled","in_progress","completed","denied","expired","cancelled"]},"example":"scheduled"},{"name":"startAt","in":"query","description":"Only showings starting at or after this time, ISO 8601 with offset.","required":false,"schema":{"type":"string","description":"Only showings starting at or after this time, ISO 8601 with offset.","example":"2026-11-01T00:00:00-07:00"},"example":"2026-11-01T00:00:00-07:00"},{"name":"endAt","in":"query","description":"Only showings starting at or before this time, ISO 8601 with offset.","required":false,"schema":{"type":"string","description":"Only showings starting at or before this time, ISO 8601 with offset.","example":"2026-11-30T23:59:59-07:00"},"example":"2026-11-30T23:59:59-07:00"},{"name":"includeShowingRequests","in":"query","description":"Also list the showing requests the lead raised on the agent's website (type showing_request, read-only). Their ids belong to a different sequence and cannot be used with the other showing endpoints. Defaults to false.","required":false,"schema":{"type":"string","description":"Also list the showing requests the lead raised on the agent's website (type showing_request, read-only). Their ids belong to a different sequence and cannot be used with the other showing endpoints. Defaults to false.","example":false,"default":"false"},"example":false},{"name":"page","in":"query","description":"Page number, starting at 0.","required":false,"schema":{"type":"string","description":"Page number, starting at 0.","example":0,"default":"0"},"example":0},{"name":"pageSize","in":"query","description":"Page size, 1-100.","required":false,"schema":{"type":"string","description":"Page size, 1-100.","example":20,"default":"20"},"example":20},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Page of showings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingListResponseEnvelope"}}}},"400":{"description":"Invalid page / pageSize / time / status (20012 INVALID_PARAMETER, 200133).","content":{"*/*":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}},"post":{"tags":["Showings V2 API"],"summary":"Create Showing","description":"Creates a showing.\n\nDetails:\n- leadId, listing, startAt and endAt are required; the caller must manage the lead.\n- listing is one of {listingId} / {mlsOrgId, mlsListingId} / {address}. When no Lofty listing matches, address is required and the showing is recorded against an external property.\n- status defaults to scheduled. requested and scheduled showings must start in the future; completed allows a past time range.\n- externalId is the idempotency key: a repeat call with the same externalId returns the existing showing with created=false.","operationId":"create","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingCreateRequestV2"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Missing field (20029 MISSING_PARAMETER); malformed time or value (20012 INVALID_PARAMETER); no listing reference (200131); listing not found and no address (200132); invalid status (200133); invalid time range (200134); Caller must manage the showing's lead (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Showing created (or found by externalId).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingCreateResponseEnvelope"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v2.0/showings/{showingId}/feedback":{"get":{"tags":["Showings V2 API"],"summary":"List Showing Feedback","description":"Returns every feedback entry on the showing, oldest first, including entries added inside Lofty. Caller must manage the showing's lead (20017 PERMISSION_DENIED).","operationId":"queryFeedback","parameters":[{"name":"showingId","in":"path","description":"Showing id.","required":true,"schema":{"type":"integer","format":"int64"},"example":987654321},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"404":{"description":"Showing does not exist or belongs to another account (200129 SHOWING_NOT_EXIST).","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Feedback entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingFeedbackListResponseEnvelope"}}}},"400":{"description":"Caller must manage the showing's lead (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}},"post":{"tags":["Showings V2 API"],"summary":"Add Showing Feedback","description":"Appends a feedback entry to a showing created by the calling partner. A showing can carry any number of entries; entries are never edited. One of content or payload is required. externalId makes the call idempotent.","operationId":"createFeedback","parameters":[{"name":"showingId","in":"path","description":"Showing id.","required":true,"schema":{"type":"integer","format":"int64"},"example":987654321},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingFeedbackRequestV2"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"The stored feedback entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingFeedbackItemResponseEnvelope"}}}},"404":{"description":"Showing does not exist or belongs to another account (200129 SHOWING_NOT_EXIST).","content":{"*/*":{"schema":{"type":"string"}}}},"403":{"description":"Showing was not created by the calling partner (200130 SHOWING_NOT_OWNED).","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Neither content nor payload (20029 MISSING_PARAMETER); invalid authorType (20012 INVALID_PARAMETER); Caller must manage the showing's lead (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v2.0/showings/{showingId}/cancel":{"post":{"tags":["Showings V2 API"],"summary":"Cancel Showing","description":"Sets the showing's status to cancelled. Equivalent to PATCH with status=cancelled. Only showings created by the calling partner can be cancelled.","operationId":"cancel","parameters":[{"name":"showingId","in":"path","description":"Showing id.","required":true,"schema":{"type":"integer","format":"int64"},"example":987654321},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"404":{"description":"Showing does not exist or belongs to another account (200129 SHOWING_NOT_EXIST).","content":{"*/*":{"schema":{"type":"string"}}}},"403":{"description":"Showing was not created by the calling partner (200130 SHOWING_NOT_OWNED).","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Caller must manage the showing's lead (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"The cancelled showing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingItemResponseEnvelope"}}}}}}},"/v2.0/sales-agent/notification/app-push/send-task-reminder":{"post":{"tags":["Notifications V2"],"summary":"Send Task Reminder Push","description":"Sends an in-app push notification to the agent assigned to the given task or appointment.","operationId":"sendAppPushTaskReminder","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTaskReminderPushRequest"}}},"required":true},"responses":{"400":{"description":"Invalid parameters (e.g., blank type), or permission denied when the task or appointment does not exist or its lead is not manageable by the caller","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Push sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}}}},"/v2.0/sales-agent/message/sms/send-to-agent":{"post":{"tags":["Notifications V2"],"summary":"Send SMS to Agent","description":"Sends a system SMS message to the caller's own phone number by default, or to the teammate named by agentId (CHIME-70593) when supplied.","operationId":"sendSystemSmsToAgent","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSmsToAgentRequest"}}},"required":true},"responses":{"400":{"description":"Invalid parameters (e.g., blank content, or agentId is not a user on the caller's team or is outside the offices the caller can see)","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"SMS sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}}}},"/v2.0/sales-agent/message/email/send-to-agent":{"post":{"tags":["Notifications V2"],"summary":"Send Email to Agent","description":"Sends a system email to the caller's own email address by default, or to the teammate named by agentId (CHIME-70593) when supplied. Unsafe HTML (scripts, iframes, forms, event handlers) is removed from the content of an email to a teammate.","operationId":"sendSystemEmailToAgent","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailToAgentRequest"}}},"required":true},"responses":{"200":{"description":"Send result as {\"result\": true|false}; when the email service refuses the send, \"code\" and \"message\" carry its reason","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"Invalid parameters (e.g., blank subject or content, or agentId is not a user on the caller's team or is outside the offices the caller can see)","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/calendar":{"get":{"tags":["Calendar V2 API"],"summary":"List Calendar Events","description":"Returns a page of calendar entries (Tasks and Appointments) for the caller, optionally filtered by leadId, type and completion status.\n\nNotes:\n- At least one of startTime or endTime is required; requests missing both return 400 INVALID_PARAMETER.\n- includeFinished=true returns both finished and unfinished entries; includeFinished=false returns only unfinished.\n- Results are wrapped under the 'data' key, which also carries pagination metadata.","operationId":"queryCalendars","parameters":[{"name":"leadId","in":"query","description":"Lead ID (optional, filter by specific lead)","required":false,"schema":{"type":"string","description":"Lead ID (optional, filter by specific lead)","example":123456},"example":123456},{"name":"startTime","in":"query","description":"Start time, ISO 8601 with offset. At least one of startTime or endTime is required.","required":false,"schema":{"type":"string","description":"Start time, ISO 8601 with offset. At least one of startTime or endTime is required.","example":"2026-01-01T00:00:00+08:00"},"example":"2026-01-01T00:00:00+08:00"},{"name":"endTime","in":"query","description":"End time, ISO 8601 with offset. At least one of startTime or endTime is required.","required":false,"schema":{"type":"string","description":"End time, ISO 8601 with offset. At least one of startTime or endTime is required.","example":"2026-12-31T23:59:59+08:00"},"example":"2026-12-31T23:59:59+08:00"},{"name":"startTimeMs","in":"query","description":"Start time as Unix timestamp in milliseconds. Used when startTime is not provided.","required":false,"schema":{"type":"string","description":"Start time as Unix timestamp in milliseconds. Used when startTime is not provided.","example":1704038400000},"example":1704038400000},{"name":"endTimeMs","in":"query","description":"End time as Unix timestamp in milliseconds. Used when endTime is not provided.","required":false,"schema":{"type":"string","description":"End time as Unix timestamp in milliseconds. Used when endTime is not provided.","example":1735660799000},"example":1735660799000},{"name":"timeZoneCode","in":"query","description":"Timezone code (IANA format, e.g., America/Los_Angeles)","required":false,"schema":{"type":"string","description":"Timezone code (IANA format, e.g., America/Los_Angeles)","example":"America/Los_Angeles"},"example":"America/Los_Angeles"},{"name":"includeFinished","in":"query","description":"Include finished calendars","required":false,"schema":{"type":"string","description":"Include finished calendars","example":false,"default":"false"},"example":false},{"name":"page","in":"query","description":"Page number (starts from 0)","required":false,"schema":{"type":"string","description":"Page number (starts from 0)","example":0,"default":"0"},"example":0},{"name":"pageSize","in":"query","description":"Page size (max 500)","required":false,"schema":{"type":"string","description":"Page size (max 500)","example":20},"example":20},{"name":"sort","in":"query","description":"Sort field (e.g., startTime)","required":false,"schema":{"type":"string","description":"Sort field (e.g., startTime)","example":"startTime","default":"startTime"},"example":"startTime"},{"name":"desc","in":"query","description":"Sort in descending order","required":false,"schema":{"type":"string","description":"Sort in descending order","example":true,"default":"true"},"example":true},{"name":"sourceType","in":"query","description":"Filter by source type codes. Multiple values allowed.","required":false,"schema":{"type":"string","description":"Filter by source type codes. Multiple values allowed.","example":[1,2,4]},"example":[1,2,4]},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters (20012 INVALID_PARAMETER).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Page of calendar entries with pagination metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarListResponseEnvelope"}}}}}},"post":{"tags":["Calendar V2 API"],"summary":"Create/Schedule Calendar Event","description":"Schedules either a Task or an Appointment for the target lead, selected by the 'type' field (case-insensitive TASK / APPOINTMENT).\n\nNotes:\n- Caller must have manage permission on the lead; otherwise 400 PERMISSION_DENIED (20017).\n- type, leadId, content, startAt and endAt are required. taskWay is additionally required when type = TASK.\n- startAt and endAt must be later than the current server time.\n- The returned data.id is a composite string ('<numericId>-task' or '<numericId>-appointment') and must be used as-is when updating, finishing or deleting the entry.\n- When startAt and endAt are both exactly midnight (00:00:00) in their declared offsets, an appointment is automatically marked as all-day.","operationId":"createCalendar","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarRequestV2"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Validation failure or permission denied. Includes: missing required field, invalid type or taskWay, startAt/endAt not later than now (20012 INVALID_PARAMETER); caller is not the manager of the specified lead (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Calendar created. The response wraps CalendarCreateResult under the 'data' key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCalendarResponseEnvelope"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v2.0/calendar/{calendarId}/unfinish":{"post":{"tags":["Calendar V2 API"],"summary":"Unfinish Calendar Event","description":"Reopens a Task or Appointment, reverting it to the not-finished state - the opposite of Finish Calendar Event. Caller must have manage permission on the entry's lead.","operationId":"unfinishCalendar","parameters":[{"name":"calendarId","in":"path","description":"Composite calendar ID of the form '<numericId>-task' or '<numericId>-appointment'.","required":true,"schema":{"type":"string"},"example":"12345-task"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Calendar marked as not completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarMessageResponseEnvelope"}}}},"400":{"description":"Invalid calendarId format or target not found (20012 INVALID_PARAMETER); caller is not the manager (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v2.0/calendar/{calendarId}/finish":{"post":{"tags":["Calendar V2 API"],"summary":"Finish Calendar Event","description":"Marks a Task or Appointment as finished. Caller must have manage permission on the entry's lead.","operationId":"finishCalendar","parameters":[{"name":"calendarId","in":"path","description":"Composite calendar ID of the form '<numericId>-task' or '<numericId>-appointment'.","required":true,"schema":{"type":"string"},"example":"12345-task"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Calendar marked as finished.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarMessageResponseEnvelope"}}}},"400":{"description":"Invalid calendarId format or target not found (20012 INVALID_PARAMETER); caller is not the manager (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v2.0/ai/prepare-insight":{"post":{"tags":["Intelligent Features"],"summary":"Prepare Insight","description":"Generates pre-meeting insight based on lead and appointment information.","operationId":"generatePrepareInsight","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePrepareInsightRequest"}}},"required":true},"responses":{"200":{"description":"Insight generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCommonResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/ai/lead-analysis":{"get":{"tags":["Intelligent Features"],"summary":"List Lead Analysis Tasks","description":"Paginates current user's LeadAnalysis tasks (last 3 months, excluding canceled/finished).","operationId":"listLeadAnalysisTasks","parameters":[{"name":"pageNum","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCommonResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"string"}}}}}},"post":{"tags":["Intelligent Features"],"summary":"Create Lead Analysis Task","description":"Triggers an AI analysis task for the specified lead list, executed asynchronously.","operationId":"createLeadAnalysisTask","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadAnalysisRequest"}}},"required":true},"responses":{"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters (leadIds is empty)","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Task created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCommonResponse"}}}}}}},"/v2.0/ai/call-summary/generate":{"post":{"tags":["Intelligent Features"],"summary":"Generate Call Summary","description":"Triggers async generation of a call summary from a call recording.","operationId":"generateCallSummary","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateCallSummaryRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Generation triggered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/ai/call-script":{"post":{"tags":["Intelligent Features"],"summary":"Generate Call Script","description":"Generates a call script based on lead information and an associated task.","operationId":"generateCallScript","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateCallScriptRequest"}}},"required":true},"responses":{"200":{"description":"Call script generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallScriptResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/agents/{agentId}/reactivate":{"post":{"tags":["Agents V2"],"summary":"Reactivate an agent","description":"Reactivates a previously deactivated agent of the caller's team.\n\nEffects:\n- The agent re-occupies a license seat (the team must have a free seat available).\n- The agent's access is restored without data loss; the agent stays in the original office with the original seat type.\n\nConstraints:\n- The caller must have team-agent management permission (MANAGE_TEAM_AGENT or MANAGE_TEAM_AGENT_DEPARTMENT).\n- The target agent must belong to the caller's team and must currently be deactivated.\n- When the team has no free seat, the call fails with SEAT_INSUFFICIENT (310111); additional seats must be purchased in the Lofty UI first.","operationId":"reactivateAgent","parameters":[{"name":"agentId","in":"path","description":"User ID of the agent to reactivate.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100234},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Always returned once authentication passes, whether the call succeeded or not. On success the body is {\"success\":true}. On failure the body is {\"code\":<error code>,\"message\":<description>} instead - the HTTP status stays 200, so check `code` (absent/0 means success) rather than the status to detect errors. Failure codes: invalid agent id (20012), agent already active (990112), insufficient seats (310111), or not authorized (1900012).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCommonResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v2.0/agents/{agentId}/deactivate":{"post":{"tags":["Agents V2"],"summary":"Deactivate an agent","description":"Deactivates the specified agent of the caller's team.\n\nEffects:\n- The agent's license seat is released immediately.\n- All CRM sessions and access tokens of the agent are revoked; subsequent API calls with the agent's tokens are rejected.\n- The agent's leads, deals and data remain untouched and stay assigned to the agent.\n- The operation is reversible via the reactivate endpoint; it is NOT a deletion.\n\nConstraints:\n- The caller must have team-agent management permission (MANAGE_TEAM_AGENT or MANAGE_TEAM_AGENT_DEPARTMENT).\n- The target agent must belong to the caller's team, must currently be active, and must not be the team owner, an office owner or the caller themselves.","operationId":"deactivateAgent","parameters":[{"name":"agentId","in":"path","description":"User ID of the agent to deactivate.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100234},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Always returned once authentication passes, whether the call succeeded or not. On success the body is {\"success\":true}. On failure the body is {\"code\":<error code>,\"message\":<description>} instead - the HTTP status stays 200, so check `code` (absent/0 means success) rather than the status to detect errors. Failure codes: invalid agent id (20012), agent already deactivated (990105), agent has not completed onboarding / no password set (990113), agent is office or team owner (990106), deactivating own account (990107), or not authorized (1900012).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCommonResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v1.0/webhook":{"post":{"tags":["Webhooks"],"summary":"Create/Register Webhook","description":"Registers a new webhook subscription so the caller's team gets notified about events - lead created/updated/deleted, lead site activity, transactions, calls/emails/texts, notes, tasks, appointments, and more. See the Webhooks tag description for the full list of event types and delivery rules. For detailed payload shapes per event type, see [Webhook Event Payloads](/docs/webhook-event-payloads).\n\nUse an `https` callback URL: http is still accepted for now and gets a warning. The response includes the signing `secret`, shown only in the create response: use it to verify the `webhook-signature` header on every delivery (see Webhook Signature Verification). An optional `authHeader` adds a fixed header to every delivery for receivers behind a gateway.","operationId":"add","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid payload: unsupported listId (WEBHOOK_TYPE_ERROR), invalid callbackUrl (WEBHOOK_CALLBACK_URL_INVALID), or subscription quota exceeded (WEBHOOK_EXCEED_LIMIT).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Subscription created. The response contains the new subscription's metadata and its signing `secret` (returned only by the create call).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/webhook/{subscribeId}/secret/rotate":{"post":{"tags":["Webhooks"],"summary":"Rotate Webhook Secret","description":"Issues a new signing secret (`whsec_...`) for one of the caller's webhooks. Use it to switch on signing for a webhook created before signing existed (its deliveries stay unsigned until you do), or to replace a secret which may have leaked. The previous secret keeps signing for 7 days: during the overlap every delivery carries one signature per secret in `webhook-signature`, so receivers can switch without downtime. Only the user who created the webhook, or a user of the same vendor, can rotate its secret. The new secret appears only in the rotate response. Rotating needs its own Webhooks permission, Rotate a webhook signing secret; keys that can already create webhooks receive it automatically.","operationId":"rotateSecret","parameters":[{"name":"subscribeId","in":"path","description":"ID of the webhook to rotate.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Subscription does not exist (WEBHOOK_DELETE_NOT_EXIST) or was created by neither the caller nor the caller's vendor (WEBHOOK_DELETE_NO_AUTHORITY).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"New secret issued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretResponse"}}}},"403":{"description":"The credential was not granted the Rotate a webhook signing secret permission: code 200100 for an OAuth access token, 200127 for an API key.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/transaction/customfields":{"get":{"tags":["Lead Transaction"],"summary":"List Transaction Custom Fields","description":"Returns the team-level custom field definitions applicable to transactions. Use the returned ids when populating LeadTransaction.customFields on create / update.\n\nScope: the caller's team.","operationId":"getTransactionCustomFields","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"The token does not carry Transactions → view (200100).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"List of custom field definitions (may be empty).","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldResponse"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"post":{"tags":["Lead Transaction"],"summary":"Create Transaction Custom Field","description":"Creates a team-level custom field for transactions and returns it, id included, so the id can be used straight away when populating LeadTransaction.customFields.\n\n**Place the field in at least one group.** A field belonging to no field group is invisible - it will not show on the transaction detail page, as a list column, or in filters. Pass `formIds` from GET /v1.0/transaction/forms, or place it from the CRM UI afterwards.\n\nDifferences from the lead custom field API worth knowing: `anniversary_date` does not exist on transactions, `html` is not offered, and the option list for select types is a bare JSON array - though the lead API's {\"option\":[...]} wrapper is accepted here too and normalised.\n\nScope: the caller's team.","operationId":"addTransactionCustomField","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCustomFieldRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"The token does not carry the Team & Organization tag for creating custom fields (200100).","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Body is {\"code\", \"message\"}. Rejected by this gateway: name empty (200068), unsupported attribute type (200307), malformed option list (200308). Rejected by the transaction service, with its own code and wording kept: name already taken (407), team at its custom-field quota, unknown or foreign field group, or a group already at its 50-field limit. Also returned when the user behind the token lacks the \"Transaction Custom Fields\" permission (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"The field that was created, id included.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/teamFeatures/custom-field":{"post":{"tags":["Team Features"],"summary":"Add Custom Field","description":"Creates a new lead-level custom field on the caller's team.\n\nNotes:\n- attributeName is required and is trimmed; empty names are rejected.\n- attributeType is required. Supported types: text, number, date, anniversary_date, single_select, multi_select, percentage, currency.\n  - anniversary_date: a date field that recurs annually (e.g. birthdays, work anniversaries). Accepts the same date format as date.\n- The response body is a plain string message.","operationId":"addCustomField","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomAttribute"}}},"required":true},"responses":{"200":{"description":"Custom field created.","content":{"application/json":{"schema":{"type":"string","example":"success"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"attributeName empty (ATTRIBUTE_NAME_EMPTY) or attributeType empty (ATTRIBUTE_TYPE_EMPTY).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/tasks":{"get":{"tags":["Tasks & Appointments"],"summary":"List Tasks (V1)","description":"Returns every task attached to the given lead, both open and finished - each entry's finishFlag says which. Caller must have manage permission on the lead.","operationId":"listTask_1","parameters":[{"name":"leadId","in":"query","description":"ID of the lead whose tasks to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tasks for the lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskListResponse"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Caller has no access to the lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"post":{"tags":["Tasks & Appointments"],"summary":"Create Task (V1)","description":"Creates a follow-up task (a to-do with a deadline and an assigned role) on the target lead.\n\nNotes:\n- content, leadId, deadline, type and assignedRole are required.\n- Caller must have manage permission on the lead.\n- The response contains only the new task's ID under the 'taskId' key.","operationId":"addTask_1","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Task created. Response contains the new task's ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIdResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid parameter (20012 INVALID_PARAMETER), or caller has no access to the lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/org/company":{"post":{"tags":["Agent Organization"],"summary":"Update Company","description":"Updates the company record associated with the caller's team. Caller must have permission to manage team organization.","operationId":"updateCompany","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Envelope with business code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOpResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameter or permission denied.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/notes":{"get":{"tags":["Notes"],"summary":"List Notes","description":"Returns all notes attached to the given lead.\n\nNotes:\n- Caller must have access to the lead; otherwise 404 LEAD_NOT_EXIST.\n- By default only user-created notes are returned. Pass includeSystemNote=true to also include automated / system-generated notes.\n- Response order is not guaranteed.","operationId":"list_2","parameters":[{"name":"leadId","in":"query","description":"ID of the lead whose notes to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"includeSystemNote","in":"query","description":"When true, include system-generated notes alongside user-created notes.","required":false,"schema":{"type":"boolean","default":false}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Notes for the lead (empty array when the lead has no notes).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteListResponse"}}}},"404":{"description":"Lead does not exist, is trashed, or is not accessible to the caller (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"post":{"tags":["Notes"],"summary":"Add/Log Note","description":"Adds (logs) a new free-text note on the target lead, recording anything worth remembering that has no structured field of its own.\n\nNotes:\n- leadId, content and isPin are required; content must not be blank.\n- content is silently truncated to 2000 characters.\n- Caller must have access to the lead; otherwise 404 LEAD_NOT_EXIST.\n- The response contains only the new note's ID under the 'noteId' key.\n- Persistence is asynchronous: subsequent GET and PUT on the returned noteId may briefly return 404 immediately after create. DELETE is unaffected.","operationId":"add_1","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Note created. Response contains the new note's ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteIdResponse"}}}},"404":{"description":"Lead does not exist, is trashed, or is not accessible to the caller (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Missing or invalid parameter: leadId is -1, content is blank, or isPin is null (20012 INVALID_PARAMETER).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/message/sms/send":{"post":{"tags":["Communication"],"summary":"Send SMS","description":"Sends an SMS to the specified lead from the caller's virtual number.\n\nNotes:\n- leadId and content are required.\n- phoneNumber + phoneCode select a specific phone on the lead; when omitted, the lead's primary phone is used.\n- Caller must have manage permission on the lead and must have an active virtual number.","operationId":"sendSms","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"SMS delivered to the provider. Response contains the message ID and destination.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/message/email/send":{"post":{"tags":["Communication"],"summary":"Send Email","description":"Sends an email to the specified lead using the caller's outgoing email configuration.\n\nNotes:\n- leadId, subject and content are required.\n- toEmail selects a specific email on the lead; when it is not present on the lead, the lead's primary email is used.\n- Caller must have manage permission on the lead.","operationId":"sendEmail","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSendRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Email delivered. Response contains the message ID, subject and destination.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSendResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/mass-actions":{"post":{"tags":["Mass Actions"],"summary":"Create a mass action plan","description":"Queues a bulk operation (mass SMS, mass email, bulk tag change, or bulk pipeline-stage change) against up to 5000 leads. Returns as soon as the plan is created; the operation itself runs asynchronously afterward.","operationId":"create_1","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMassActionRequest"}}},"required":true},"responses":{"400":{"description":"Invalid parameters, e.g. missing/blank required params for the given type, a tag or pipeline stage name that does not exist, or more than 5000 leadIds (20012 INVALID_PARAMETER).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Plan created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MassActionResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/logType":{"get":{"tags":["Lead Manual Log"],"summary":"List manual logs of a lead","description":"Returns the lead's manual-log entries for a single channel (logCall, logEmail or logText), paginated via offset+limit or cursor (currentId).\n\nNotes:\n- Only entries whose logType equals logCall, logEmail or logText are returned. Auto-captured communications are not included.\n- Caller must have access to the lead; otherwise 404 LEAD_NOT_EXIST.\n- Default mode (currentId=0): offset + limit pagination, ordered by sort and order.\n- Cursor mode (currentId > 0): the sort parameter is ignored; entries are ordered by id, with timelineTime as secondary key, matching the direction in order.\n- limit outside [1, 1000] is silently reset to 10; offset < 0 is silently reset to 0; offset + limit > 20000 returns 400 OFFSET_EXCEED_LIMIT.\n- sort=createTime (default) orders by the entry time as logged by the agent (usually equal to the record's creation time). sort=id orders by the entry's ID.\n- order=asc (default) returns oldest first; pass order=desc for newest first.","operationId":"list_3","parameters":[{"name":"leadId","in":"query","description":"ID of the lead whose manual logs to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"logType","in":"query","description":"Channel filter. Case-sensitive.","required":true,"schema":{"type":"string","enum":["logCall","logEmail","logText"]},"example":"logCall"},{"name":"offset","in":"query","description":"Zero-based index of the first entry to return. Values < 0 are silently reset to 0. Ignored when currentId > 0.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"limit","in":"query","description":"Number of entries to return per page. Values outside [1, 1000] are silently reset to 10. offset + limit must not exceed 20000.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":10},"example":10},{"name":"currentId","in":"query","description":"This parameter is used for page turning. When searching by ID is invoked, the interface would starts from this ID, and retrieve data sequentially. It is recommended to use this parameter as a replacement for offset to turn the page within the limit.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"sort","in":"query","description":"Sort field. 'createTime' orders by the entry's logged time; 'id' orders by the entry's ID. Ignored in cursor mode.","required":false,"schema":{"type":"string","default":"createTime","enum":["createTime","id"]}},{"name":"order","in":"query","description":"Sort direction. 'asc' returns oldest first; 'desc' returns newest first.","required":false,"schema":{"type":"string","default":"asc","enum":["asc","desc"]}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid logType (not one of logCall/logEmail/logText — business code 20012), or offset+limit exceeds 20000 (business code 200104).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Page of manual log entries for the requested channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogTypeListResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist, is trashed, or is not accessible to the caller (business code 20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}}}},"post":{"tags":["Lead Manual Log"],"summary":"Add a manual log entry (call, email or text)","description":"Creates a manual log entry (logCall, logEmail or logText) for the target lead.\n\nNotes:\n- Persistence is asynchronous. The response returns the new entry's ID once the write is enqueued; the entry becomes readable after a short delay.\n- Caller must have access to the lead (owner, shared agent, or assigned lender), and the lead must not be trashed. Otherwise 404 LEAD_NOT_EXIST.\n- leadId, logType and content are required for all channels.\n- content is silently truncated to 5000 characters.\n- outboundOrInbound must be exactly 'outbound' or 'inbound' when supplied; omitted values default to 'outbound'.\n- For logCall: leadPhoneNumber is required (max 20 characters). callingOutcome is optional (max 20 characters); an omitted or unrecognized value leaves the outcome empty.\n- For logEmail: emailSubject / toEmail / fromEmail are optional and accepted as-is.","operationId":"add_2","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogTypeRequest"}}},"required":true},"responses":{"400":{"description":"Invalid parameter (20012 INVALID_PARAMETER): missing leadId, blank content, invalid logType, invalid outboundOrInbound, or logCall without leadPhoneNumber. Or parameter too long (20043 PARAMETER_TOO_LONG): leadPhoneNumber > 20 chars, or callingOutcome > 20 chars.","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist, is trashed, or is not accessible (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Entry accepted for persistence. The response contains the newly assigned ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogTypeSingleResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/leads":{"get":{"tags":["Leads"],"summary":"List Leads","description":"Returns a page of leads matching the supplied filters with pagination metadata. Commonly filtered by assignedUserId (leads assigned to a specific agent) and contacted (whether the lead has or hasn't been reached yet) — see the parameter list for the full set of filters.\n\nNotes:\n- limit must be in [1, 100]; otherwise 400 LIMIT_NOT_VALID.\n- Use offset for offset-based pagination or scrollId for cursor-based pagination.\n- Multiple filters are combined with AND logic; multi-value filters within a single parameter (e.g. allTags, anyTags) apply their documented AND / OR semantics.","operationId":"list_4","parameters":[{"name":"stage","in":"query","description":"Search for lead by pipeline stage names.","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","description":"Search for lead by source name.","required":false,"schema":{"type":"string"}},{"name":"phone","in":"query","description":"Precise search for lead by phone number.\nExample: 3479033333","required":false,"schema":{"type":"string"}},{"name":"email","in":"query","description":"Precise search for lead by email address.","required":false,"schema":{"type":"string"}},{"name":"assignedUserId","in":"query","description":"Search for contacts by user that is assigned to them.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"contacted","in":"query","description":"Search for contacts by if they have or have not been contacted.","required":false,"schema":{"type":"boolean"}},{"name":"groups","in":"query","description":"Search for lead by group names. deprecated, use segments instead.","required":false,"schema":{"type":"string"}},{"name":"segments","in":"query","description":"Search for lead by segment names.","required":false,"schema":{"type":"string"}},{"name":"allTags","in":"query","description":"Search for lead with all tag names.","required":false,"schema":{"type":"string"}},{"name":"anyTags","in":"query","description":"Search for lead with any tag names.","required":false,"schema":{"type":"string"}},{"name":"groupIds","in":"query","description":"Search for lead by office ids.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"querySubGroup","in":"query","description":"Query sub group leads or not","required":false,"schema":{"type":"boolean"}},{"name":"scrollId","in":"query","description":"Scroll ID for the search. You can then use the scroll ID to retrieve the next batch of results for the request.","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","description":"Start index of the responded leads","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Quantitative limitation of responded leads, range: [1, 100]","required":false,"schema":{"type":"integer"}},{"name":"sort","in":"query","description":"The sort order can be one of the following: Default, LastContact, LastCall, LastEmail, LastActivity, CreateTime, Inquries, DeleteTime, AssignTime, Score, Activity, Communication, HasDrip, HasAlert, Task, Lender, ActivitySearch, ActivityViews, ActivityFavorites, DripStatus, DripOpenRate, AlertFrequency, AlertOpenRate, SCOREV2 or SmartPlanStatus","required":false,"schema":{"type":"string"}},{"name":"desc","in":"query","description":"Descending sort(true) or ascending sort(false)","required":false,"schema":{"type":"boolean"}},{"name":"languages","in":"query","description":"Search for lead with any languages (abbreviation)","required":false,"schema":{"type":"string"}},{"name":"preciseSearchFlag","in":"query","description":"Whether to precise search for leads based on email or phone","required":false,"schema":{"type":"boolean"}},{"name":"roleAssigneeFilters","in":"query","description":"[{\"roleName\":\"Lead assign role name\",\"assigneeToIds\":[111,222]}]","required":false,"schema":{"type":"string"}},{"name":"key","in":"query","description":"Search by name, phone or email","required":false,"schema":{"type":"string"}},{"name":"otherFilters","in":"query","description":"URL-encoded JSON object with extra filter criteria. Supported keys: `leadIds` (array of lead IDs), `regStartTime` and `regEndTime` (lead creation time, epoch milliseconds), `withTrash` (boolean). Invalid JSON or a wrong value type makes the whole value ignored, so the request runs without these filters. See Listing leads in the [Leads concept page](/concepts/leads).","required":false,"schema":{"type":"string"},"example":{"regStartTime":1730419200000,"regEndTime":1733011199999}},{"name":"returnFields","in":"query","description":"Comma-separated source paths to load for each lead, for example `data.lead,data.emailList,data.phoneList`. These are search-document paths, not response field names: a value such as `leadId` matches nothing and returns no leads. Always include `data.lead`, and include `data.callOptIn,data.textOptIn,data.emailOptIn` if you read `cannotCall`, `cannotText` or `cannotEmail`. Fields that are not loaded come back empty. See Listing leads in the [Leads concept page](/concepts/leads) for the path list.","required":false,"schema":{"type":"string"},"example":"data.lead,data.emailList,data.phoneList,data.callOptIn,data.textOptIn,data.emailOptIn"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters, such as limit out of range (LIMIT_NOT_VALID).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Page of matching leads with pagination metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}},"post":{"tags":["Leads"],"summary":"Create Lead","description":"Creates a new lead.\n\n## Lead Assignment & Routing\n\n**Assignment priority:**\n1. If `assignedUserId` is provided, the lead is directly assigned to the given agent. No routing rules are applied.\n2. If `pondId` is provided, the lead is put into that lead pond (no agent assignee). No routing rules are applied. Use a pond ID returned by `GET /v1.0/team-features/lead-ponds`; `pondId` cannot be combined with `assignedUserId` or `assignGroupId`. If the lead is created but the pond move fails, the response still carries `leadId` plus a `message`.\n3. If neither is provided, the lead goes through automatic lead routing based on the configured routing rules.\n\n**Routing rule scope** (when routing is triggered):\n- `assignGroupId = -1` → Apply company-level routing rules.\n- `assignGroupId = <officeId>` → Apply routing rules for the specified office.\n- `assignGroupId` not set → Default routing rules will be applied according to the lead’s ownership scope.\n\n**Routing location matching:**\n- For Seller (1) type leads, routing is determined by the `property` field (property address/location).\n- For all other lead types (Buyer, Renter, etc.), routing is determined by `inquiry.locations[]` (interested areas).\n\n## Lead Ownership\n\nControls the visibility scope of the lead:\n- `ownershipScope = TEAM` → Account-wide: visible to all users in the Lofty client account.\n- `ownershipScope = OFFICE` → Visible to a specific office. Must provide `ownershipId` with the office ID.\n- `ownershipScope = PERSONAL` → Visible only to the assigned agent. Must provide `ownershipId` with the agent's user ID.\n- If not specified, defaults to PERSONAL scope owned by the API caller.\n\n> Important: `ownershipScope = TEAM` refers to the entire client account (the organization), not the Lofty \"Team add-on\" product.\n\n## Eventual consistency\n\nPersistence is asynchronous. The lead ID is returned immediately, but subsequent GET /v1.0/leads/{leadId} and similar read endpoints may briefly return 404 right after create. Subsequent writes (PUT, POST inquiry, POST property, POST transaction) are unaffected.\n\n## Property block\n\nThe optional `property` block is persisted together with the lead:\n- Omit it entirely if you don't need to attach an address — the lead is still created.\n- If provided, at least one of `city`, `state`, `zipCode`, `streetAddress` must be non-blank; otherwise the request is rejected with **200057 PROPERTY_ADDRESS_EMPTY** and no lead is created.","operationId":"add_3","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters. Includes: missing required lead field (20012 INVALID_PARAMETER); `property` block supplied with every address field (`city` / `state` / `zipCode` / `streetAddress`) blank (200057 PROPERTY_ADDRESS_EMPTY); `pondId` not available to the caller (200140 LEAD_POND_NOT_AVAILABLE); `pondId` combined with `assignedUserId` or `assignGroupId` (200141 LEAD_POND_ASSIGNEE_CONFLICT).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Lead created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIdResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/leads/{leadId}/transaction":{"post":{"tags":["Lead Transaction"],"summary":"Create Transaction","description":"Creates a new transaction under the given lead.","operationId":"addTransaction","parameters":[{"name":"leadId","in":"path","description":"Lead ID. Must be manageable by the caller.","required":true,"schema":{"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTransaction"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead not manageable (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Transaction created. The response is the persisted transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTransaction"}}}},"400":{"description":"Validation failure: transactionName blank or contains '<' / '>' (200062 TRANSACTION_NAME_BLANK, 200062 TRANSACTION_NAME_HTML), or commission rules violated (20012 INVALID_PARAMETER, with the raw validation message in the body).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/leads/{leadId}/transaction/property/address":{"post":{"tags":["Lead Transaction"],"summary":"Update Property Address","description":"Updates the property address of a transaction. The `transactionId` is carried in the request body, not the URL.\n\n**Full replacement** — omitted fields are set to null. To update a single field, GET the current address first, modify, then resubmit the whole object.","operationId":"updateTransactionPropertyAddress","parameters":[{"name":"leadId","in":"path","description":"Lead ID. Must be manageable by the caller.","required":true,"schema":{"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTransactionPropertyAddress"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Envelope {code, message}. code=0 indicates success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCallbackResponse"}}}},"400":{"description":"transactionId missing from the request body (20012 INVALID_PARAMETER).","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead not manageable (20006 LEAD_NOT_EXIST) or transaction not found / not bound to leadId (200060 TRANSACTION_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/leads/{leadId}/savedSearches":{"get":{"tags":["Saved Searches"],"summary":"List the saved searches of a lead","description":"Returns every saved search of the lead, including its conditions and alert delivery settings. Returns an empty collection when the lead has none.","operationId":"listSavedSearches","parameters":[{"name":"leadId","in":"path","description":"ID of the lead whose saved searches to list.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"source","in":"query","description":"Comma separated origins to keep: AGENT_CREATED, LEAD_CREATED, SYSTEM_CREATED. Defaults to all. System-created searches are usually excluded when migrating, because the target system generates its own and importing ours would duplicate the alerts.","required":false,"schema":{"type":"string","example":"AGENT_CREATED,LEAD_CREATED"}},{"name":"includeInactive","in":"query","description":"Include searches whose alerts are switched off. Note that an INSTANTLY cadence is active, not off.","required":false,"schema":{"type":"boolean","default":false}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"403":{"description":"The token user cannot access this lead"},"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchListResponse"}}}},"400":{"description":"Invalid source value"}}},"post":{"tags":["Saved Searches"],"summary":"Create a property alert or market snapshot for a lead","description":"Sets up a new property alert (category PROPERTY_ALERT) or market snapshot (category MARKET_SNAPSHOT) for the lead, with its locations, price range, bedrooms and email frequency - the same as adding a saved search in the CRM. Every field is a readable value: weekdays and AM/PM for the schedule, cadence names, email addresses for recipients. The lead needs at least one email address. A search with the same filters as an existing one of the lead is refused. Returns the search as stored, and in ignoredFields the request fields that were not applied.\n\nRequired: category, name (1-255 characters), alertFrequency and criteria.\n\nThe rules of each filter are on the criteria fields; schedule defaults are on the schedule field.","operationId":"createSavedSearch","parameters":[{"name":"leadId","in":"path","description":"ID of the lead to create the saved search for.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchWriteRequest"},"examples":{"propertyAlert":{"summary":"A buyer Property Alert","description":"Sent to the lead's primary email. To choose recipients, add recipientEmails with addresses that belong to this lead.","value":{"category":"PROPERTY_ALERT","name":"San Jose 3BR under 1.2M","alertFrequency":"DAILY","schedule":{"MON":"AM","THU":"AM"},"criteria":{"locations":{"cities":["San Jose, CA"]},"priceMin":800000,"priceMax":1200000,"bedsMin":3,"bathsMin":2,"propertyTypes":["Single Family Home"],"listingStatuses":["Active","Pending"]},"sendFirstEmailNow":true}},"marketSnapshot":{"summary":"A seller Market Snapshot around the lead's home","description":"marketSnapshot","value":{"category":"MARKET_SNAPSHOT","name":"Homes sold near 123 Main St","alertFrequency":"MONTHLY","schedule":{"MON":"AM"},"criteria":{"locations":{"mapCircles":[{"center":{"lat":37.3382,"lng":-121.8863},"radius":1,"unit":"miles"}]},"daysSold":90}}}}}},"required":true},"responses":{"403":{"description":"The token user cannot access this lead"},"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}}}}},"/v1.0/leads/{leadId}/savedSearches/resume":{"post":{"tags":["Saved Searches"],"summary":"Resume the alerts of a lead's saved searches","description":"Switches alerts back on for the given saved searches, each at the cadence it ran at before it was paused (frequencyBeforePause on the read endpoint). Searches already on are reported as ALREADY_ACTIVE and keep their cadence. A search whose earlier cadence is unknown stays paused and is reported as PRIOR_FREQUENCY_UNKNOWN with a message; set alertFrequency through the update endpoint for it instead. The other searches resume as usual. A result of NOT_CHANGED means the search could not be switched on and should be checked in the CRM.","operationId":"resumeSavedSearches","parameters":[{"name":"leadId","in":"path","description":"ID of the lead whose alerts to resume.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResumeRequest"}}},"required":true},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchStatusChangesResponse"}}}},"403":{"description":"The token user cannot access this lead"},"404":{"description":"A saved search id is not one of this lead's"}}}},"/v1.0/leads/{leadId}/savedSearches/pause":{"post":{"tags":["Saved Searches"],"summary":"Pause the alerts of a lead's saved searches","description":"Stops the Property Alert and/or Market Snapshot emails of a lead without deleting the searches. Select either by category (every search of the given kinds) or by id, not both. Searches already switched off are reported as ALREADY_INACTIVE and left untouched, so repeating the call is safe. Resume restores the cadence each search had before (previousAlertFrequency in the result).","operationId":"pauseSavedSearches","parameters":[{"name":"leadId","in":"path","description":"ID of the lead whose alerts to pause.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchPauseRequest"},"examples":{"byCategory":{"summary":"Every Property Alert and Market Snapshot of the lead","description":"byCategory","value":{"categories":["PROPERTY_ALERT","MARKET_SNAPSHOT"]}},"byId":{"summary":"Only the listed saved searches","description":"byId","value":{"savedSearchIds":[88123456789]}}}}},"required":true},"responses":{"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchStatusChangesResponse"}}}},"403":{"description":"The token user cannot access this lead"},"404":{"description":"A saved search id is not one of this lead's"}}}},"/v1.0/leads/{leadId}/property":{"post":{"tags":["Leads"],"summary":"Update Property Address","description":"Attach a property (or mailing address) to the specified lead. The behaviour depends on the `property.id` field in the request body:\n\n- **`id` omitted or `<= 0`** — the service first tries to merge with an existing property on the lead that has the same street/city/state/zip; if no match is found, a new property record is created.\n- **`id > 0`** — the named property is updated in place. The property must belong to this lead (its `leadUserId` must match the lead's); otherwise the request is rejected with 200108 LEAD_PROPERTY_NOT_EXIST.\n\nValidation:\n- At least one of `city`, `state`, `zipCode`, `streetAddress` must be non-blank; otherwise 200057 PROPERTY_ADDRESS_EMPTY is returned.\n- Caller must have manage permission on the lead.","operationId":"updateProperty","parameters":[{"name":"leadId","in":"path","description":"ID of the lead whose property/address to update.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadProperty"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist or is not accessible (20006 LEAD_NOT_EXIST); supplied `property.id` does not belong to this lead (200108 LEAD_PROPERTY_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Validation failure. Includes: every address field blank (200057 PROPERTY_ADDRESS_EMPTY); malformed or missing request body.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Property created or updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIdResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/leads/{leadId}/inquiry":{"post":{"tags":["Leads"],"summary":"Add Inquiry","description":"Sets what kind of property or home the lead is looking for: price range, property type, bedrooms/bathrooms, and which locations they're interested in.","operationId":"updateInquiry","parameters":[{"name":"leadId","in":"path","description":"ID of the lead whose inquiry to set.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadInquiry"}}},"required":true},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIdResponse"}}}}}}},"/v1.0/leads/{leadId}/assignment":{"post":{"tags":["Leads"],"summary":"Assign Lead","description":"Assigns a lead to one or more agents, one assignee per role (`Agent`, `Assistant`, `Lender`).\n\nCaller must have manage permission on the lead, and the lead must belong to the caller's team; otherwise the request fails with \"no authority\".\n\n## Lead Pond\n\nTo move the lead into a lead pond, send the `Agent` entry with `pondId` instead of `assignee`, e.g. `[{\"role\":\"Agent\",\"pondId\":12345}]`. The pond replaces the agent assignee. Use a pond ID returned by `GET /v1.0/team-features/lead-ponds`; other ponds are rejected. The move is applied asynchronously, so a read right after may still show the previous assignee.","operationId":"assign","parameters":[{"name":"leadId","in":"path","description":"ID of the lead to assign.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"Lead assignees","items":{"$ref":"#/components/schemas/LeadAssigineeRequest"}}}},"required":true},"responses":{"400":{"description":"Lead pond rejected: the pond does not exist, is disabled or is not available to the caller (200140 LEAD_POND_NOT_AVAILABLE); `pondId` is set on a non-Agent entry, next to an `assignee`, or next to another Agent entry (200141 LEAD_POND_ASSIGNEE_CONFLICT).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIdResponse"}}}}}}},"/v1.0/leads/{leadId}/activity":{"post":{"tags":["Leads"],"summary":"Log Website Activity","description":"Records a single website-tracked activity event for the lead: a search, viewing a listing (browse), saving a favorite, requesting a showing, or submitting a form. Captures automated on-site visitor behavior only - not a manually logged communication (see the Manual Log endpoints) or a CRM note/task.","operationId":"activity","parameters":[{"name":"leadId","in":"path","description":"ID of the lead the activity happened on.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadActivity"}}},"required":true},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIdResponse"}}}}}}},"/v1.0/leads/assignee":{"post":{"tags":["Leads"],"summary":"Preview Routing","description":"Returns the assignees that would be selected by routing rules for a hypothetical lead matching the supplied name, email and other attributes. Useful for previewing routing before creating the lead.\n\nNotes:\n- firstName and email are required.\n- The response lists one entry per role matched by routing.","operationId":"getAssigneeInfo","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadAssigneeRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Assignee matches for the supplied lead info.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeadCustomRoleAssigneeInfo"}}}}},"400":{"description":"firstName missing (PARAM_FIRST_NAME_FILL) or email missing (PARAM_EMAIL_MUST_FILL).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/agent/{agentId}/tag/add":{"post":{"tags":["Agent User"],"summary":"Add tags to an agent","description":"Attaches one or more tags to the specified agent in batch.\n\nNotes:\n- tagNames must not be empty; up to 20 entries per call.\n- When autoCreate is true, tag names not yet defined on the team are created; when false, unknown tag names cause the call to fail.\n- The response envelope carries data = true and errorCode = 0 on success.","operationId":"addAgentTag","parameters":[{"name":"agentId","in":"path","description":"User ID of the agent to tag.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100234},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTagRequest"}}},"required":true},"responses":{"400":{"description":"Empty tag names, too many tag names, or invalid agent id.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultBoolean"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultBoolean"}}}},"404":{"description":"Agent does not exist or is not in the caller's team.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultBoolean"}}}},"200":{"description":"Envelope indicating whether the batch add succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddAgentTagResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultBoolean"}}}}}}},"/v1.0/agent/send-notification":{"post":{"tags":["Opportunity"],"summary":"Send Opportunity Alert","description":"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.\n\n**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.\n\n## Delivery channels\n\n| Channel | Trigger |\n|---|---|\n| In-app push | All notificationType values |\n| SMS + Email | Browse (11/48/138), Saved listing (9/52/136), Saved search (27/140), Mortgage calculator (89), Return-to-site (166) |\n\nIf the lead belongs to a lead pond, the notification is broadcast to all pond members instead of the single assignee.\n\n## Important notes\n\n- The leadId **must** belong to the caller's own team.\n- Agents whose team has the OPPORTUNITY resource disabled are silently skipped.\n- This endpoint is **not idempotent**. Repeated calls produce repeated deliveries.\n- The `data` field in the response is a best-effort success hint, not a strict delivery confirmation. See the 200 response description for details.","operationId":"sendOpportunityNotification","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunityNotificationRequest"}}},"required":true},"responses":{"400":{"description":"Missing leadId, or invalid token / rate-limited / package quota exceeded (the latter three are handled by the common filter chain before reaching this endpoint; see RateLimitFilter / PackageLimitFilter).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOpportunityNotificationResponse"}}}},"500":{"description":"Internal error (error code 20005).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/agent/profile/add":{"post":{"tags":["Agent User"],"summary":"Create a new agent","description":"Creates a new agent under the caller's team using the supplied profile.\n\nNotes:\n- accountInfo.phoneNumber and accountInfo.emailAddress are required.\n- When phoneCode is omitted, '1' (US) is used by default.\n- When roleName is supplied, it is resolved to the team's matching role; unknown names are ignored and the agent is created without a role binding.\n- Long text fields (address, licenseId, position, personalWebsite, personalIntroduction, social-media item values) are silently truncated to their individual limits.\n- The response envelope carries errorCode = 0 on success; non-zero values indicate validation failure or upstream error, with errorMsg describing the cause.","operationId":"addAgent","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProfile"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultLong"}}}},"200":{"description":"Envelope with the new agent's user ID, or a non-zero errorCode on failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddAgentResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultLong"}}}}}}},"/v1.0/agent/communication":{"post":{"tags":["Communication"],"summary":"Search by Agent","description":"Returns a page of communication timeline entries for the caller (or the caller's team when teamView=true, requiring ACCESS_ALL_TEAM_LEADS permission), filtered by type and optional time range. The response is a page wrapper with totalCount, offset, limit, and pageData.","operationId":"getCommunicationByAgent","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationRequest"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Page of communication entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult"}}}},"400":{"description":"Invalid parameters, or teamView=true without ACCESS_ALL_TEAM_LEADS permission.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/showings/{showingId}":{"get":{"tags":["Showings V2 API"],"summary":"Get Showing","description":"Returns one showing with its listing, agents and lead. Caller must manage the showing's lead (20017 PERMISSION_DENIED).","operationId":"get","parameters":[{"name":"showingId","in":"path","description":"Showing id.","required":true,"schema":{"type":"integer","format":"int64"},"example":987654321},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"404":{"description":"Showing does not exist or belongs to another account (200129 SHOWING_NOT_EXIST).","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"The showing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingItemResponseEnvelope"}}}},"400":{"description":"Caller must manage the showing's lead (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}},"patch":{"tags":["Showings V2 API"],"summary":"Update or Reschedule Showing","description":"Reschedules a showing created by the calling partner, changes its status (for example mark it completed) or replaces its comment. Only non-empty fields are applied.\n\nDetails:\n- startAt and endAt may be sent independently; the other end keeps its value. After the change startAt must still be before endAt, and a requested / scheduled showing cannot be moved into the past.\n- Any status transition is accepted except to the internal SOLD state; the partner is responsible for ordering.\n- An update changing nothing is a no-op and emits no webhook.","operationId":"update_2","parameters":[{"name":"showingId","in":"path","description":"Showing id.","required":true,"schema":{"type":"integer","format":"int64"},"example":987654321}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingUpdateRequestV2"}}},"required":true},"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"404":{"description":"Showing does not exist or belongs to another account (200129 SHOWING_NOT_EXIST).","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"The updated showing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowingItemResponseEnvelope"}}}},"403":{"description":"Showing was not created by the calling partner (200130 SHOWING_NOT_OWNED).","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Malformed time or status (20012, 200133); invalid time range (200134); Caller must manage the showing's lead (20017 PERMISSION_DENIED).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v2.0/working-leads":{"get":{"tags":["Sales Agents V2"],"summary":"List Working Leads","description":"Lists the leads a Sales Agent is working now, among the leads the caller can see. Each lead names the Sales Agent working it and when it started its latest follow-up (workingStartedAt). The list comes from a search index that trails the actual state: a lead that was just stopped or taken out of the pool can stay listed for a short while, and then its Sales Agent fields and workingStartedAt are null. Use GET /v2.0/sales-agents/by-lead for a lead's current state. Filtering by AI stage is no longer supported: a request with a non-empty aiStage is refused with 400.","operationId":"getWorkingLeads","parameters":[{"name":"limit","in":"query","description":"Page size, 1 to 100; offset + limit must not exceed 10000","required":false,"schema":{"maximum":100,"minimum":1,"type":"string","description":"Page size, 1 to 100; offset + limit must not exceed 10000","example":20,"default":"20"},"example":20},{"name":"offset","in":"query","description":"Start index of the responded leads, 0 or more; offset + limit must not exceed 10000","required":false,"schema":{"minimum":0,"type":"string","description":"Start index of the responded leads, 0 or more; offset + limit must not exceed 10000","example":0,"default":"0"},"example":0},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters (limit outside 1 to 100, a negative offset, offset + limit above 10000, or the unsupported aiStage filter).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Working leads retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkingLeadListResponseV2"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/website/featureAreas/{featureAreaId}":{"get":{"tags":["Website"],"summary":"Get a Feature Area","description":"One Feature Area with its location, generated intro / detail / FAQ content and its sub-pages.","operationId":"getFeatureArea","parameters":[{"name":"featureAreaId","in":"path","description":"Feature Area id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAreaDetail"}}}},"401":{"description":"Missing or invalid authentication token."},"404":{"description":"No such Feature Area on the caller's site."},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/website/featureAreas/{featureAreaId}/pages":{"get":{"tags":["Website"],"summary":"List the sub-pages of a Feature Area","description":"The intro, listing-search and market pages generated for one Feature Area.","operationId":"listFeatureAreaPages","parameters":[{"name":"featureAreaId","in":"path","description":"Feature Area id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{}}},"404":{"description":"No such Feature Area on the caller's site."},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/website/audit/technical-files":{"get":{"tags":["Site Audit"],"summary":"Audit technical files","description":"robots.txt, sitemap.xml and llms.txt of the caller's primary website as fetched from the live site: per file whether it exists, HTTP status, size, last-modified and any fetch error; the robots rules grouped by user agent (`groups`, each with its `userAgents` and `disallow` rules) and whether a sitemap is declared; the sitemap URL count. Returns an audit section `{section, siteId, generatedAt, partial, data}`; `data` is a `TechnicalFiles`.","operationId":"getTechnicalFiles","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package."},"404":{"description":"The caller has no primary website."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalFilesSection"}}}}}}},"/v2.0/website/audit/structure":{"get":{"tags":["Site Audit"],"summary":"Audit structure","description":"Navigation tree, page counts per type and how the Feature Area pages are linked from the home page of the caller's primary website. The navigation tree is the menu in the live header: internal links without a live page are left out, except neighborhood menu items; external links are kept; folders left without children are left out. `totalPages` counts every page of the site; `pageTypeCounts` are site-wide counts per type (navigation, feature_area, landing_page) and may overlap, so they need not add up to `totalPages`. Returns an audit section `{section, siteId, generatedAt, partial, data}`; `data` is a `SiteStructure`.","operationId":"getStructure","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package."},"404":{"description":"The caller has no primary website."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteStructureSection"}}}}}}},"/v2.0/website/audit/seo-settings":{"get":{"tags":["Site Audit"],"summary":"Audit SEO settings","description":"Site-level SEO settings of the caller's primary website: brand name, intro video link, site keywords and the site's Feature Areas (the first 50 by id, with their total count and version). `featuredAreaCount` is the site's Feature Area count, equal to `featureAreaCount` of overview. Returns an audit section `{section, siteId, generatedAt, partial, data}`; `data` is a `SeoSettings`.","operationId":"getSeoSettings","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeoSettingsSection"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package."},"404":{"description":"The caller has no primary website."}}}},"/v2.0/website/audit/pages":{"get":{"tags":["Site Audit"],"summary":"Audit pages","description":"The menu pages of the caller's primary website, the same pages as the CMS SEO > Page SEO table, with their menu label, URL, SEO title, description and keywords (title and description lengths) and their saved templates (`rawTitle`, `rawDescription`, `rawKeywords`), H1, hero image alt, schema types and last update; at most 100. Feature Area pages, landing pages and blog posts are not listed; the site-wide page counts are in structure. Items carry fetchError when the live page fetch failed; \"redirected to another domain: …\" means the page redirects off the site. `title` and `description` are the values shown on the live page, with template variables already filled in. The saved templates are in each item's `rawTitle` / `rawDescription` / `rawKeywords`. When a value comes from a variable such as {{Company Name}}, change the source (for example the company name in CRM) instead of replacing the variable with fixed text. A variable still in braces is a value the audit could not fill; the live page may display the same text or a fallback value. `h1Count`, `hasSchema` and `schemaTypes` are null when the page could not be checked right now; 0 / false / [] mean the live page has none. An empty `h1` with `h1Count` of at least 1 and a fetchError means the H1 exists but its live text could not be read. Returns an audit section `{section, siteId, generatedAt, partial, data}`; `data` is a `{page, size, total, items: PageItem[]}`.","operationId":"listPages","parameters":[{"name":"page","in":"query","description":"Page number, from 1.","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"size","in":"query","description":"Page size, clamped to 1-50.","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageListSection"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package."},"404":{"description":"The caller has no primary website."}}}},"/v2.0/website/audit/pages/{pageId}":{"get":{"tags":["Site Audit"],"summary":"Audit page detail","description":"One page of the caller's primary website: the fields of its Audit pages item, including the saved templates, plus its schema JSON. Only pages listed by Audit pages are found. The page carries fetchError when its live fetch failed; \"redirected to another domain: …\" means the page redirects off the site. Returns an audit section `{section, siteId, generatedAt, partial, data}`; `data` is a `PageDetail`.","operationId":"getPage","parameters":[{"name":"pageId","in":"path","description":"Page id, as listed by the pages endpoint.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDetailSection"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package."},"404":{"description":"No such page on the caller's site (404003), or the caller has no primary website (404001)."}}}},"/v2.0/website/audit/overview":{"get":{"tags":["Site Audit"],"summary":"Audit overview","description":"The caller's primary website: id, domain, status, how many pages and how many Feature Areas it has. `featureAreaCount` is the site's Feature Area count, equal to `featuredAreaCount` of seo-settings and `pageTypeCounts.feature_area` of structure. Returns an audit section `{section, siteId, generatedAt, partial, data}`; `data` is a `SiteOverview`.","operationId":"getOverview","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package."},"404":{"description":"The caller has no primary website."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteOverviewSection"}}}}}}},"/v2.0/website/audit/integrations":{"get":{"tags":["Site Audit"],"summary":"Audit integrations","description":"Whether Google Search Console, Bing Webmaster Tools and Google Business Profile are connected to the caller's primary website, and whether the NAP (name, address, phone) on the site matches the Business Profile. For Bing, `connected` means the Bing account is linked and `verified` means the site is verified. Returns an audit section `{section, siteId, generatedAt, partial, data}`; `data` is a `Integrations`.","operationId":"getIntegrations","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsSection"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package."},"404":{"description":"The caller has no primary website."}}}},"/v2.0/website/analytics/visitors/type":{"get":{"tags":["Website"],"summary":"New vs returning visitors","description":"How many visitors were new and how many returning, their shares and how the shares moved against the previous period. The period is at most 365 days and defaults to the last 30 days.","operationId":"getVisitorType","parameters":[{"name":"siteId","in":"query","description":"Website to read. Defaults to the caller's primary website; must be a site the caller owns.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","description":"First day of the period, yyyy-MM-dd, in the agent's CRM time zone. Defaults to 29 days before endDate.","required":false,"schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Last day of the period, yyyy-MM-dd. Defaults to today.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitorTypeBreakdown"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/website/analytics/visitors/by-source":{"get":{"tags":["Website"],"summary":"Visitors by traffic source","description":"Visitors per channel (Direct, Paid, Search Organic, Social Organic, Email, AI, Other) and each channel's share. The period is at most 365 days and defaults to the last 30 days.","operationId":"getVisitorsBySource","parameters":[{"name":"siteId","in":"query","description":"Website to read. Defaults to the caller's primary website; must be a site the caller owns.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","description":"First day of the period, yyyy-MM-dd, in the agent's CRM time zone. Defaults to 29 days before endDate.","required":false,"schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Last day of the period, yyyy-MM-dd. Defaults to today.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/website/analytics/traffic/trend":{"get":{"tags":["Website"],"summary":"Daily website traffic","description":"Visitors, page views and page views per visitor for every day of the period, dated in the agent's CRM time zone. The period is at most 365 days and defaults to the last 30 days.","operationId":"getTrafficTrend","parameters":[{"name":"siteId","in":"query","description":"Website to read. Defaults to the caller's primary website; must be a site the caller owns.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","description":"First day of the period, yyyy-MM-dd, in the agent's CRM time zone. Defaults to 29 days before endDate.","required":false,"schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Last day of the period, yyyy-MM-dd. Defaults to today.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/website/analytics/traffic/overview":{"get":{"tags":["Website"],"summary":"Website traffic overview","description":"Visitors, page views and page views per visitor for the period, each with the change rate against the previous period (the previous value itself is not available yet and is null). Same numbers as the CRM Traffic Report. The period is at most 365 days and defaults to the last 30 days.","operationId":"getTrafficOverview","parameters":[{"name":"siteId","in":"query","description":"Website to read. Defaults to the caller's primary website; must be a site the caller owns.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","description":"First day of the period, yyyy-MM-dd, in the agent's CRM time zone. Defaults to 29 days before endDate.","required":false,"schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Last day of the period, yyyy-MM-dd. Defaults to today.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrafficOverview"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/website/analytics/traffic/by-page-type":{"get":{"tags":["Website"],"summary":"Traffic by page type and source","description":"Page views, visitors and page views per visitor broken down by page type (Home, Listing Detail, …) and traffic source. The period is at most 365 days and defaults to the last 30 days.","operationId":"getTrafficByPageType","parameters":[{"name":"siteId","in":"query","description":"Website to read. Defaults to the caller's primary website; must be a site the caller owns.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","description":"First day of the period, yyyy-MM-dd, in the agent's CRM time zone. Defaults to 29 days before endDate.","required":false,"schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Last day of the period, yyyy-MM-dd. Defaults to today.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageTypeTraffic"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/website/analytics/pageviews/by-device":{"get":{"tags":["Website"],"summary":"Page views by device","description":"Desktop and mobile page views, their shares and the share change against the previous period. The period is at most 365 days and defaults to the last 30 days.","operationId":"getPageViewsByDevice","parameters":[{"name":"siteId","in":"query","description":"Website to read. Defaults to the caller's primary website; must be a site the caller owns.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","description":"First day of the period, yyyy-MM-dd, in the agent's CRM time zone. Defaults to 29 days before endDate.","required":false,"schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Last day of the period, yyyy-MM-dd. Defaults to today.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceBreakdown"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/website/analytics/activity/by-source":{"get":{"tags":["Website"],"summary":"Listing views and searches per visitor by source","description":"Average listing-detail views and listing searches per visitor, overall and per traffic source. The period is at most 365 days and defaults to the last 30 days.","operationId":"getActivityBySource","parameters":[{"name":"siteId","in":"query","description":"Website to read. Defaults to the caller's primary website; must be a site the caller owns.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","description":"First day of the period, yyyy-MM-dd, in the agent's CRM time zone. Defaults to 29 days before endDate.","required":false,"schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Last day of the period, yyyy-MM-dd. Defaults to today.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitorActivityBySource"}}}},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/website/analytics/activity/by-hour":{"get":{"tags":["Website"],"summary":"Visitor activity by hour of week","description":"Visitors for every weekday (0 = Sunday … 6 = Saturday) and hour (0-23), plus the busiest cell. The period is at most 365 days and defaults to the last 30 days.","operationId":"getActivityByHour","parameters":[{"name":"siteId","in":"query","description":"Website to read. Defaults to the caller's primary website; must be a site the caller owns.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"startDate","in":"query","description":"First day of the period, yyyy-MM-dd, in the agent's CRM time zone. Defaults to 29 days before endDate.","required":false,"schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Last day of the period, yyyy-MM-dd. Defaults to today.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HourlyActivity"}}}},"401":{"description":"Missing or invalid authentication token."},"403":{"description":"The caller is not a website-only agent and the site is on neither the Full Website nor the Hyperlocal Website package, or the site is not the caller's."}}}},"/v2.0/transactions":{"get":{"tags":["Transactions V2"],"summary":"List Transactions","description":"Search and list transactions with pagination and an optional keyword filter that matches against the transaction name, property address, or the associated lead's name.","operationId":"searchTransactions","parameters":[{"name":"pageSize","in":"query","description":"Page size; must be between 1 and 100.","required":false,"schema":{"type":"integer","format":"int32","default":20},"example":20},{"name":"pageNum","in":"query","description":"Page number (0-based); must be >= 0.","required":false,"schema":{"type":"integer","format":"int32","default":0},"example":0},{"name":"queryKey","in":"query","description":"Search keyword. Performs a contains-style fuzzy match (first 15 characters only) against transaction name, property address, or the associated lead name; matching any one field is sufficient.","required":false,"schema":{"type":"string"},"example":123},{"name":"leadId","in":"query","description":"Optional. Restrict results to transactions belonging to this lead.","required":false,"schema":{"type":"integer","format":"int64"},"example":100001},{"name":"transactionType","in":"query","description":"Optional. Filter by transaction type: Purchase, Listing, Lease, Other, or All to return every type in a single call. Defaults to Purchase when omitted. Unrecognized values return 400 (20012 INVALID_PARAMETER).","required":false,"schema":{"type":"string"},"example":"All"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"pageNum < 0 or unrecognized transactionType (20012 INVALID_PARAMETER), or pageSize out of range (20042 LIMIT_NOT_VALID).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionV2PageResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/transactions/pipelines":{"get":{"tags":["Transactions V2"],"summary":"List Transaction Pipelines","description":"Returns the team's full transaction pipeline configuration: for each transaction type (Purchase, Listing, Lease, Other), the ordered list of stages with their IDs, names and semantic flags. Use this to discover the valid status values before creating or updating transactions — stage names are customizable per team, so they must not be hardcoded.","operationId":"listPipelines","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionPipelinesV2Response"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/tasks/my-tasks":{"get":{"tags":["Tasks & Appointments V2"],"summary":"My Tasks","description":"Returns tasks assigned to the caller, sorted by startTime descending. Supports cursor-based pagination via currentId (offset) + limit.\n\nNotes:\n- currentId must be >= 0 (INVALID_PARAMETER otherwise).\n- limit must be in [1, 100] (LIMIT_NOT_VALID otherwise).\n- timeZoneCode selects how start/end times are formatted; when omitted, the caller's configured timezone is used.","operationId":"listTasksByUser","parameters":[{"name":"userId","in":"query","description":"User ID to query tasks for. Defaults to the current authenticated user if not provided.","required":false,"schema":{"type":"integer","description":"User ID to query tasks for. Defaults to the current authenticated user if not provided.","format":"int64","nullable":true}},{"name":"currentId","in":"query","description":"Cursor-based pagination anchor. Pass the last returned item's id to fetch the next page. Default 0 (start from beginning).","required":false,"schema":{"type":"integer","description":"Cursor-based pagination anchor. Pass the last returned item's id to fetch the next page. Default 0 (start from beginning).","format":"int64","default":0}},{"name":"limit","in":"query","description":"Page size, 1–100. Default 10.","required":false,"schema":{"type":"integer","description":"Page size, 1–100. Default 10.","default":10}},{"name":"timeZoneCode","in":"query","description":"IANA timezone code (e.g. 'America/New_York'). If not provided, falls back to the user's configured timezone.","required":false,"schema":{"type":"string","description":"IANA timezone code (e.g. 'America/New_York'). If not provided, falls back to the user's configured timezone.","nullable":true}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Tasks assigned to the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskV2ListResponse"}}}},"400":{"description":"currentId < 0 (INVALID_PARAMETER) or limit out of range (LIMIT_NOT_VALID).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/sales-agents/quota":{"get":{"tags":["Sales Agents V2"],"summary":"Get Sales Agent Quota","description":"Lead capacity of each Sales Agent the caller may use. Capacity is concurrent: one lead takes one slot however many messages it gets, on any channel. When the Sales Agent is full it stops taking new leads and keeps working the ones it has. Capacity never resets on a schedule: a slot is freed only when a lead is finished or stopped, or more capacity is bought. A borrowed team Sales Agent reports the team owner's pool; members borrowing it do not have their own. usedQuota is the number of leads worked now, not cumulative usage.","operationId":"getSalesAgentQuota","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Capacity of each usable Sales Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesAgentQuotaListResponseV2"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/sales-agents/current":{"get":{"tags":["Sales Agents V2"],"summary":"List Usable Sales Agents","description":"Lists every Sales Agent the caller may use: their own (salesAgentType personal) and the team Sales Agent they borrow from the team owner (team). A team owner's own Sales Agent is the team Sales Agent. Returns an empty array when the caller has no usable Sales Agent. Includes the four channel switches.","operationId":"getCurrentUserSalesAgent","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"The caller's usable Sales Agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesAgentListResponseV2"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/sales-agents/by-lead":{"get":{"tags":["Sales Agents V2"],"summary":"Get Sales Agent by Lead","description":"Tells whether a Sales Agent is working the lead (workingStatus working, stopped or not_working) and which one. A stopped lead names the Sales Agent that last worked it. A lead no Sales Agent works or worked answers not_working with every Sales Agent field null. A Sales Agent the caller cannot use (for example another member's personal Sales Agent) is reported as salesAgentType other with its owner and name.","operationId":"getSalesAgentByLeadId","parameters":[{"name":"leadId","in":"query","description":"Lead ID","required":true,"schema":{"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Caller does not have access to this lead.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"The lead's Sales Agent state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSalesAgentResponseV2"}}}},"400":{"description":"Invalid lead ID parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCommonResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/leads/{leadId}/activities":{"get":{"tags":["Lead Activity V2 API"],"summary":"List lead activities (unified timeline)","description":"Returns a unified timeline of call, text and email activities for the given lead, including both auto-captured and agent-logged entries, sorted by activityTime ascending.\n\nNotes:\n- Caller must have access to the lead; otherwise 404 LEAD_NOT_EXIST.\n- Use currentId for cursor-based pagination or offset for offset-based pagination.","operationId":"listActivities","parameters":[{"name":"leadId","in":"path","description":"ID of the lead whose activities to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"currentId","in":"query","description":"Cursor-based pagination anchor. Pass the last returned item's id to fetch the next page. Default 0 (start from beginning).","required":false,"schema":{"type":"integer","description":"Cursor-based pagination anchor. Pass the last returned item's id to fetch the next page. Default 0 (start from beginning).","format":"int64"}},{"name":"offset","in":"query","description":"Offset for offset-based pagination. Ignored when currentId > 0. Default 0.","required":false,"schema":{"type":"integer","description":"Offset for offset-based pagination. Ignored when currentId > 0. Default 0.","default":0}},{"name":"limit","in":"query","description":"Page size, 1–1000. Default 10.","required":false,"schema":{"type":"integer","description":"Page size, 1–1000. Default 10.","default":10}},{"name":"timeZoneCode","in":"query","description":"Timezone in IANA format (e.g. America/Los_Angeles). Affects activityTime formatting. Defaults to user configured timezone if not provided.","required":false,"schema":{"type":"string","description":"Timezone in IANA format (e.g. America/Los_Angeles). Affects activityTime formatting. Defaults to user configured timezone if not provided.","nullable":true}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Unified activity entries for the lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityListResponse"}}}},"404":{"description":"Lead does not exist or is not accessible to the caller (20006 LEAD_NOT_EXIST).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v2.0/communication/text/{communicationId}":{"get":{"tags":["Communication V2"],"summary":"Get a text message by ID","description":"Returns the text message identified by the given communication ID. The communication must be a text record, and the caller must have manage permission on the owning lead; otherwise 400 PERMISSION_DENIED is returned (no existence leak).\n\nWebhook follow-up: when a Text webhook is delivered, pass each `createdText[].timelineId` from the payload as the `communicationId` path parameter to fetch the full record. The legacy `createdText[].textId` field is kept for backward compatibility but is not interchangeable across communicationType — prefer `timelineId`.","operationId":"getText","parameters":[{"name":"communicationId","in":"path","description":"Communication ID of the text message.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Text message retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Communication does not exist, is not a text record, or caller has no access to the owning lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/communication/email/{communicationId}":{"get":{"tags":["Communication V2"],"summary":"Get an email by ID","description":"Returns the email identified by the given communication ID. The communication must be an email record, and the caller must have manage permission on the owning lead; otherwise 400 PERMISSION_DENIED is returned (no existence leak).\n\nWebhook follow-up: when an Email webhook is delivered, pass each `createdEmail[].timelineId` from the payload as the `communicationId` path parameter to fetch the full record. The legacy `createdEmail[].emailId` field is kept for backward compatibility but is not interchangeable across communicationType — prefer `timelineId`.","operationId":"getEmail","parameters":[{"name":"communicationId","in":"path","description":"Communication ID of the email.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Email retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailResponse"}}}},"400":{"description":"Communication does not exist, is not an email record, or caller has no access to the owning lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/communication/call/{communicationId}":{"get":{"tags":["Communication V2"],"summary":"Get a call by ID","description":"Returns the call identified by the given communication ID. The communication must be a call record, and the caller must have manage permission on the owning lead; otherwise 400 PERMISSION_DENIED is returned (no existence leak). Manually logged calls (those with no backing dialer record) are populated from the communication content itself — leadPhoneNumber from the logged number and direction inferred from the channel; dialer-only fields (elapsedTime, status, etc.) are omitted.\n\nWebhook follow-up: when a Call webhook is delivered, pass each `createdCall[].timelineId` from the payload as the `communicationId` path parameter to fetch the full record. The legacy `createdCall[].callId` field is kept for backward compatibility but is not interchangeable across communicationType (it points at the dialer record for MANUAL calls) — prefer `timelineId`.","operationId":"getCall","parameters":[{"name":"communicationId","in":"path","description":"Communication ID of the call.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Call retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallResponse"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Communication does not exist, is not a call record, has no backing dialer record, or caller has no access to the owning lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/communication/agent":{"get":{"tags":["Communication V2"],"summary":"Search communications by Agent (cursor paged)","description":"Returns communication timeline entries for the caller (or the caller's team when teamView=true, requiring ACCESS_ALL_TEAM_LEADS permission) within a time range.\n\n- The time window (endTime - startTime) may span up to 90 days in a single query.\n- type accepts CALL, TEXT, EMAIL, or ALL to fetch all three together in one request.\n- limit controls the page size and must be between 1 and 1000 (default 100).\n- Cursor pagination: the response returns a nextCursor token; pass it back as the 'cursor' parameter to fetch the next page. Keep paging while nextCursor is non-null and stop when it is null. Because a full page cannot tell whether more entries exist, the last page may come back with an empty data array and nextCursor=null - treat that as end-of-data, not an error. This is the recommended way to sync large or historical ranges.","operationId":"searchByAgent","parameters":[{"name":"type","in":"query","description":"Communication type to query: CALL, TEXT, EMAIL or ALL.","required":false,"schema":{"type":"string","enum":["CALL","TEXT","EMAIL","ALL"]},"example":"ALL"},{"name":"startTime","in":"query","description":"Start timestamp (epoch milliseconds), inclusive.","required":true,"schema":{"type":"integer","format":"int64"},"example":946710000000},{"name":"endTime","in":"query","description":"End timestamp (epoch milliseconds), inclusive. The interval (endTime - startTime) cannot exceed 90 days.","required":true,"schema":{"type":"integer","format":"int64"},"example":954486000000},{"name":"limit","in":"query","description":"Number of entries per page.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":100},"example":100},{"name":"cursor","in":"query","description":"Opaque pagination token returned as nextCursor by the previous page. Omit for the first page.","required":false,"schema":{"type":"string"}},{"name":"teamView","in":"query","description":"Search the team leads' communications. Requires ACCESS_ALL_TEAM_LEADS permission. Default false.","required":false,"schema":{"type":"boolean","default":false},"example":false},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paged communication entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationCursorPage"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters, invalid cursor, or teamView=true without ACCESS_ALL_TEAM_LEADS permission.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v2.0/calendar/meetings/available":{"get":{"tags":["Calendar V2 API"],"summary":"Available Meetings","description":"Returns available meeting time slots within the given time range, sorted by startTime ascending.\n\nNotes:\n- Either startTime (ISO 8601) or startTimeMs (millisecond timestamp) must be provided; same for endTime / endTimeMs. When both forms are provided for a field, the string form takes precedence.\n- The resolved start time must be later than the current server time.\n- The resolved end time must be later than the resolved start time.\n- The range between start and end must not exceed 90 days.\n- At most 'limit' slots are returned; the envelope also includes the total count.","operationId":"getAvailableMeetings","parameters":[{"name":"startTime","in":"query","description":"Start time in ISO 8601 format with offset. Preferred over startTimeMs when both are provided.","required":false,"schema":{"type":"string"},"example":"2026-01-15T09:00:00-08:00"},{"name":"endTime","in":"query","description":"End time in ISO 8601 format with offset. Preferred over endTimeMs when both are provided.","required":false,"schema":{"type":"string"},"example":"2026-03-15T09:00:00-08:00"},{"name":"startTimeMs","in":"query","description":"Start time as Unix timestamp in milliseconds. Used when startTime is not provided.","required":false,"schema":{"type":"integer","format":"int64"},"example":1768496400000},{"name":"endTimeMs","in":"query","description":"End time as Unix timestamp in milliseconds. Used when endTime is not provided.","required":false,"schema":{"type":"integer","format":"int64"},"example":1773680400000},{"name":"timeZoneCode","in":"query","description":"IANA timezone identifier. When omitted, the caller's configured timezone is used.","required":false,"schema":{"type":"string"},"example":"America/Los_Angeles"},{"name":"limit","in":"query","description":"Maximum number of slots to return.","required":false,"schema":{"minimum":1,"type":"integer","format":"int32","default":10},"example":10},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Available meeting slots with total count.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableMeetingsResponseEnvelope"}}}},"400":{"description":"Invalid time range or parameters (20012 INVALID_PARAMETER).","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v2.0/ai/call-summary":{"get":{"tags":["Intelligent Features"],"summary":"Get Call Summary","description":"Queries and returns the generated call summary for a call recording.","operationId":"getCallSummary","parameters":[{"name":"callRecordId","in":"query","description":"ID of the call recording whose summary to retrieve.","required":true,"schema":{"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Call summary retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSummaryResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/webhooks":{"get":{"tags":["Webhooks"],"summary":"List Webhooks","description":"Shows every webhook subscription the caller created and configured for their team. A secret is never included here. See the Webhooks tag description for the full list of event types. For detailed payload shapes per event type, see [Webhook Event Payloads](/docs/webhook-event-payloads).","operationId":"list","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Webhook subscriptions created by the caller (may be empty).","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/vendor/list":{"get":{"tags":["Vendor"],"summary":"List Vendors","description":"Returns the vendor directory for the team .Notes:\n- Scope: the list is scoped to the caller's team (teamId is resolved from the token).\n- Ordering is not guaranteed; do not rely on a specific sort order.\n- Only the fields defined in VendorInfo are exposed; internal fields are not returned.\n- The response is a bare JSON array; empty array when the team has no vendors.","operationId":"getVendorInfo","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Permission denied (error code 20017 PERMISSION_DENIED). The token is valid but the authorization scope does not allow listing team vendors.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Vendor list for the caller's team. Empty array when the team has no vendors.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorInfo"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Authentication failed. Token is missing, malformed, expired or revoked.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/users/{userId}":{"get":{"tags":["Members"],"summary":"Get a team member by user ID (deprecated)","description":"Returns a team member of the caller's team by user ID. Deprecated: prefer GET /v1.0/members/{account} when only the email is available, or GET /v1.0/members with pagination for directory listing.","operationId":"getMemberById","parameters":[{"name":"userId","in":"path","description":"User ID of the team member to retrieve.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100234},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"User does not exist in the caller's team (20003 USER_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Team member retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}},"deprecated":true}},"/v1.0/transaction/forms":{"get":{"tags":["Lead Transaction"],"summary":"List Transaction Field Groups","description":"Returns the field groups (\"forms\") defined for a transaction type, so a caller can choose where a new custom field should appear.\n\nRead-only: groups are created, renamed and deleted from the CRM UI.\n\nScope: the caller's team.","operationId":"getTransactionForms","parameters":[{"name":"type","in":"query","description":"Transaction type to list groups for.","required":true,"schema":{"type":"integer","format":"int32"},"example":1},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"The token does not carry Transactions → view (200100).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Field groups for the requested type (may be empty).","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransactionFormResponse"}}}}}}}},"/v1.0/teamFeatures/listTag":{"get":{"tags":["Team Features"],"summary":"List Lead Tags","description":"Returns the lead tags available to the caller within the team. Includes both team-wide tags and tags scoped to the caller.","operationId":"listTag","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Lead tags visible to the caller.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserLeadTag"}}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/teamFeatures/listCustomField":{"get":{"tags":["Team Features"],"summary":"List Custom Fields","description":"Returns the lead-level custom field definitions configured on the caller's team. Use the returned IDs when populating custom field values on leads.","operationId":"listCustomField","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Lead custom field definitions for the team.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomAttribute"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/teamFeatures/lead-pipelines":{"get":{"tags":["Team Features"],"summary":"List Lead Pipelines","description":"Returns a page of lead pipeline entries defined on the caller's team. Use the returned lead pipeline IDs when assigning or filtering leads.\n\nNotes:\n- currPage is zero-based.\n- Pass a non-empty name to filter lead pipeline entries by a name substring; omit it to list all.\n- _metadata.total reflects the full result size before pagination.","operationId":"listLeadPipeline","parameters":[{"name":"name","in":"query","description":"Optional lead pipeline name filter (substring match). Defaults to empty.","required":false,"schema":{"type":"string","default":""},"example":"Active"},{"name":"currPage","in":"query","description":"Zero-based page index.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"pageSize","in":"query","description":"Number of entries to return per page.","required":false,"schema":{"minimum":1,"type":"integer","format":"int32","default":10},"example":10},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Page of lead pipeline entries with pagination metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineListResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/team-features/lead-ponds":{"get":{"tags":["Team Features"],"summary":"List Lead Ponds","description":"Returns the lead ponds on the caller's team that the caller has access to.","operationId":"listLeadPonds","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Lead ponds visible to the caller.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeadPond"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/team-features/lead-pond/{id}":{"get":{"tags":["Team Features"],"summary":"Get Lead Pond","description":"Returns a single lead pond by ID. The pond must belong to the caller's team and be visible to the caller (office-level lead-pond manage permission). If it is not, the request fails with 400 Permission denied; the same error is returned whether the pond does not exist or simply is not visible, so existence is not disclosed.","operationId":"findPondById","parameters":[{"name":"id","in":"path","description":"ID of the lead pond.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":12345},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Lead pond retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPond"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Permission denied (errorCode 20017): the lead pond does not exist, is disabled, belongs to another team, or is outside the caller's manageable offices. These cases are intentionally indistinguishable.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/systemLogs":{"get":{"tags":["Lead System Logs"],"summary":"System Logs","description":"Returns system-event timeline entries for the lead, sorted by timelineTime descending (newest first), with offset-based pagination.\n\nOnly system / change-log activity events are returned (e.g. stage changes, assignment/routing, subscriptions, smart-plan tasks). Call, text, email and site-activity (search / view / favorite) entries are NOT included, nor is note content (e.g. adding a note); edit/delete-note actions (types 17/18) are included. Each entry includes both the `timelineType` integer and a human-readable `timelineTypeDesc` name, so you do not need to map the integer yourself.\n\nNote: `startTime`/`endTime` query parameters are epoch milliseconds, but the `timelineTime`/`createTime`/`updateTime` fields in the response are ISO-8601 strings.\n\nAuthorization: the authenticated user must be the lead's owner or the shared agent; otherwise 403 is returned.","operationId":"list_1","parameters":[{"name":"leadId","in":"query","description":"ID of the lead.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"startTime","in":"query","description":"Inclusive lower bound (milliseconds since Unix epoch, UTC). ","required":false,"schema":{"type":"integer","format":"int64","default":-1},"example":1735689600000},{"name":"endTime","in":"query","description":"Inclusive upper bound (milliseconds since Unix epoch, UTC). ","required":false,"schema":{"type":"integer","format":"int64","default":-1},"example":1738368000000},{"name":"pageNumber","in":"query","description":"0-based page index.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"pageSize","in":"query","description":"Number of entries per page.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":100},"example":100},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"System log page retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemLogPageResponse"}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"The authenticated user does not have access to this lead.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/routing/rule/list/{type}":{"get":{"tags":["Lead Routing"],"summary":"Lead Routing Rules","description":"Returns the routing rules configured on the caller's team for the given business type. Caller must have MANAGE_LEAD_DISTRIBUTION or MANAGE_LEAD_DISTRIBUTION_DEPARTMENT permission.","operationId":"listRule","parameters":[{"name":"type","in":"path","description":"Routing business type.","required":true,"schema":{"type":"integer","format":"int32","enum":["1","2","4"]},"example":1},{"name":"roleId","in":"query","description":"Role ID. Required when type = 4 (ASSISTANT_LEAD).","required":false,"schema":{"type":"integer","format":"int32","default":-1},"example":101},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid type or roleId, or permission denied. Business codes include PERMISSION_DENIED (20017), BUSINESS_TYPE_ERROR, INVAID_ROLE_ID.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Routing rules for the given business type.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoutingRule"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/routing/role/list":{"get":{"tags":["Lead Routing"],"summary":"List assign roles","description":"Returns the assignable roles defined on the caller's team. Use the returned IDs when the routing business type is ASSISTANT_LEAD. Caller must have MANAGE_LEAD_DISTRIBUTION or MANAGE_LEAD_DISTRIBUTION_DEPARTMENT permission.","operationId":"listRoleId","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Permission denied (PERMISSION_DENIED 20017).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Assign roles defined on the team.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssignRole"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/routing/member/list/{type}":{"get":{"tags":["Lead Routing"],"summary":"List members available for assignment","description":"Returns members that can be assigned when routing leads of the given business type. Caller must have MANAGE_LEAD_DISTRIBUTION or MANAGE_LEAD_DISTRIBUTION_DEPARTMENT permission.","operationId":"listAssignMember","parameters":[{"name":"type","in":"path","description":"Routing business type.","required":true,"schema":{"type":"integer","format":"int32","enum":["1","2","4"]},"example":1},{"name":"roleId","in":"query","description":"Role ID. Required when type = 4 (ASSISTANT_LEAD).","required":false,"schema":{"type":"integer","format":"int32","default":-1},"example":101},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Assignable members for the given business type.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssignMember"}}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid type or roleId, or permission denied (PERMISSION_DENIED 20017, BUSINESS_TYPE_ERROR, INVAID_ROLE_ID).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/org":{"get":{"tags":["Agent Organization"],"summary":"Get Organization","description":"Returns the organization structure the caller belongs to.\n\nNotes:\n- When the caller is part of a multi-team group (brokerage), orgType is MULTI_TEAM and multiTeamInfo carries the parent group's ID and name; enterpriseInfo is absent.\n- Otherwise orgType is SIGNAL_INSTANCE and enterpriseInfo describes the caller's office, visible sub-offices, and assigned permission profile.\n- visibleOrgInfoList depends on the caller's permissions: callers with MANAGE_ORGANIZATION see all offices in the company; callers with MANAGE_ORGANIZATION_DEPARTMENT see their own office's sub-offices; others receive an empty list.","operationId":"getOrgInfo","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Organization info for the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInfo"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/org/permission/profiles":{"get":{"tags":["Agent Organization"],"summary":"List Permission Profiles","description":"Returns the permission profiles (role templates) defined on the caller's team. Use these IDs when assigning roles to team members.\n\nCaller must have MANAGE_TEAM_AGENT or MANAGE_PERMISSION_PROFILE permission; otherwise 400 VENDOR_HAS_NO_PERMISSION.","operationId":"getPermissionProfile","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Caller lacks permission to read permission profiles (VENDOR_HAS_NO_PERMISSION).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Permission profiles defined on the team.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PermissionProfile"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/members":{"get":{"tags":["Members"],"summary":"Team Members","description":"Returns members of the caller's team, optionally filtered by office / group IDs, with pagination metadata.\n\nNotes:\n- limit must not exceed the configured maximum; oversized values return 400 LIMIT_PARAM_OVERSIZE.\n- offset < 0 is silently reset to 0.\n- total in _metadata reflects the full result size before pagination.\n- When groupIds is omitted, all members visible to the caller are returned.\n- When accountTypes is omitted, only platform users are returned, as before. Pass accountTypes=normal,roster to also include Display Only members: they are paged together with platform users (newest first) and counted in total, and an office admin only sees Display Only members of the offices visible to them.\n- Each member carries accountType (normal or roster). Display Only members have no login, role or permissions; their accountStatus is always Active.\n- An unknown accountTypes value returns 400 INVALID_PARAMETER.","operationId":"getMembers","parameters":[{"name":"groupIds","in":"query","description":"Office / group IDs to filter members by. When omitted, all visible members are returned.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int64"}},"example":[12345,67890]},{"name":"offset","in":"query","description":"Zero-based index of the first entry to return. Values < 0 are silently reset to 0.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"limit","in":"query","description":"Number of entries to return per page.","required":false,"schema":{"minimum":1,"type":"integer","format":"int32","default":25},"example":25},{"name":"accountTypes","in":"query","description":"Account types to return: normal (platform users) and / or roster (Display Only members). Case-insensitive. When omitted, only platform users are returned.","required":false,"schema":{"type":"array","items":{"type":"string","enum":["normal","roster"]}},"example":["normal","roster"]},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"limit exceeds the configured maximum (LIMIT_PARAM_OVERSIZE), or accountTypes has a value other than normal / roster (INVALID_PARAMETER).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Page of team members with pagination metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberListResponse"}}}},"404":{"description":"Team has no members matching the filter (20003 USER_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/members/{account}":{"get":{"tags":["Members"],"summary":"Get a team member by account (email)","description":"Returns a team member of the caller's team identified by their login email. The member must have accepted the team invitation.","operationId":"getMemberByAccount","parameters":[{"name":"account","in":"path","description":"Login email of the team member to retrieve.","required":true,"schema":{"type":"string"},"example":"alice@example.com"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"*/*":{"schema":{"type":"string"}}}},"404":{"description":"No accepted team member with the given account in the caller's team (20003 USER_NOT_EXIST).","content":{"*/*":{"schema":{"type":"string"}}}},"200":{"description":"Team member retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v1.0/me":{"get":{"tags":["Members"],"summary":"Get the current user's profile (who am I)","description":"Returns the team-member profile of the caller, resolved from the authentication token - i.e. which user/agent the token is logged in as.","operationId":"getMemberAboutMe","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Current user's profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/mass-actions/{planId}":{"get":{"tags":["Mass Actions"],"summary":"Get mass action plan progress","description":"Returns a mass action plan's current status and task counts (done/in progress/paused/timeout/failed). Only returns a plan created by the caller.","operationId":"progress","parameters":[{"name":"planId","in":"path","description":"ID of the plan, from the create response.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":83920145},{"name":"showParams","in":"query","description":"Include the plan's original params/filter in the response.","required":false,"schema":{"type":"boolean","default":false}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"No such plan, or it was not created by the caller (20007 RESOURCE_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Plan progress.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/logType/{logTypeId}":{"get":{"tags":["Lead Manual Log"],"summary":"Get a manual log entry by ID","description":"Returns a single manual log entry by its ID.\n\nReturns 404 RESOURCE_NOT_EXIST when:\n- The ID does not exist or has been deleted.\n- The ID exists but its logType is not one of logCall, logEmail or logText.\n\nAn ID returned by POST /v1.0/logType may briefly return 404 here until the asynchronous write has been applied.","operationId":"getLogCallId","parameters":[{"name":"logTypeId","in":"path","description":"ID of the manual log entry to retrieve.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Manual log entry retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogTypeSingleResponse"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Entry not found, already deleted, or not a manual log (business code 20007 RESOURCE_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}}}},"delete":{"tags":["Lead Manual Log"],"summary":"Delete a manual log entry","description":"Deletes a manual log entry by its ID. Only entries whose logType is logCall, logEmail or logText can be deleted here; deletion of other timeline types returns 404 RESOURCE_NOT_EXIST.\n\nCaller must have manage permission on the entry's lead. The response body is empty.","operationId":"delete_2","parameters":[{"name":"logTypeId","in":"path","description":"ID of the manual log entry to delete.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token."},"200":{"description":"Log entry deleted successfully. No response body."},"404":{"description":"Entry does not exist or is not a manual log (20007 RESOURCE_NOT_EXIST), or the caller has no access to the owning lead (20006 LEAD_NOT_EXIST)."},"500":{"description":"Internal server error."}}}},"/v1.0/listing":{"get":{"tags":["Listing"],"summary":"Search by Agent / Office","description":"Searches active and sold listings for a specific agent (the caller by default), their office, or a set of MLS listing IDs.\n\nNotes:\n- limit must be in (0, 1000]; otherwise 400 LISTING_LIMIT_NOT_VALID.\n- listingId and soldListingId cannot be supplied together; doing so returns an error envelope on HTTP 200.\n- At least one of agentListings, officeListings, listingId, soldListingId, mlsListingIds, buildingName, or buildingAddress must identify the search target.\n- When userId differs from the caller, caller must have MANAGE_TEAM_AGENT permission, the user must be on the caller's team, and an office admin may only access users in the offices visible to them.","operationId":"getByUserId","parameters":[{"name":"userId","in":"query","required":false,"schema":{"type":"integer","format":"int64","default":0}},{"name":"listingId","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"nextPageKey","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"soldNextPageKey","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"mlsListingIds","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"street","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":25}},{"name":"soldListingId","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"officeListings","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"agentListings","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"buildingName","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"buildingAddress","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"showCondition","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"originalPictures","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"userId does not exist (USER_NOT_EXIST), or the alert-condition lookup failed (ALERT_CONDITION_FEGIN_FAIL).","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Caller has no access to the specified userId's data (NO_ACCESS_WEBSITE).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Search result envelope with active listings, sold listings, and listing metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingSearchResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid parameters (LISTING_LIMIT_NOT_VALID or combination errors).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/leads/{leadId}/transactions":{"get":{"tags":["Lead Transaction"],"summary":"List by Lead","description":"Returns all transactions attached to the given lead.","operationId":"listTransactionsByLeadId","parameters":[{"name":"leadId","in":"path","description":"Lead ID. Must belong to the caller's team and be manageable by the caller.","required":true,"schema":{"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of transactions (may be empty).","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeadTransaction"}}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist or caller has no manage permission (error code 20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/leads/{leadId}/transaction/{transactionId}/property/address":{"get":{"tags":["Lead Transaction"],"summary":"Get Property Address","description":"Returns the property address associated with a transaction.","operationId":"getTransactionPropertyAddress","parameters":[{"name":"leadId","in":"path","description":"Lead ID. Must be manageable by the caller.","required":true,"schema":{"type":"integer","format":"int64"},"example":100001},{"name":"transactionId","in":"path","description":"Transaction ID. Must exist and be bound to leadId.","required":true,"schema":{"type":"integer","format":"int64"},"example":10001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Property address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTransactionPropertyAddress"}}}},"404":{"description":"Lead not manageable (20006 LEAD_NOT_EXIST), transaction not found / not bound to leadId (200060 TRANSACTION_NOT_EXIST), or property address not set (RESOURCE_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/leads/{leadId}/activities":{"get":{"tags":["Leads"],"summary":"Lead Activities","description":"Returns the lead's site-tracked activities (browse / search / favorite / showing request / submission) across tracking types 1, 2, 3, 23 and 39, merged and sorted by created time descending.\n\nNotes:\n- Caller must have manage permission on the lead; otherwise 404 LEAD_NOT_EXIST.\n- Page size is fixed at 100; use curPage to step through pages.","operationId":"listActivities_1","parameters":[{"name":"leadId","in":"path","description":"ID of the lead whose activities to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"curPage","in":"query","description":"Zero-based page index; page size is fixed at 100.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Lead does not exist or caller has no access (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Activities for the lead.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeadActivity"}}}}},"401":{"description":"Missing or invalid authentication token (BAD_CREDENTIALS).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/getPublishedListings":{"get":{"tags":["Listing"],"summary":"Get Published Listings","description":"Returns the caller team's published listings as an XML feed. Intended for external syndication partners; the response content type is application/xml.","operationId":"getPublishedListings","parameters":[{"name":"type","in":"query","description":"Feed variant to emit.","required":true,"schema":{"type":"string","enum":["LuxVT","AptCom","AllOnMarket"]},"example":"AllOnMarket"},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Published listings feed. The response body is XML.","content":{"application/xml":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/xml":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/v1.0/communication/text":{"get":{"tags":["Communication"],"summary":"SMS History","description":"Returns text message history entries for the given lead. Lead must belong to the caller's team.","operationId":"getCommunicationText","parameters":[{"name":"leadId","in":"query","description":"ID of the lead whose text history to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"offset","in":"query","description":"Zero-based index of the first entry to return.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"limit","in":"query","description":"Number of entries per page.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":10},"example":10},{"name":"currentId","in":"query","description":"This parameter is used for page turning. When searching by ID is invoked, the interface would starts from this ID, and retrieve data sequentially. It is recommended to use this parameter as a replacement for offset to turn the page within the limit.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist or is outside the caller's team (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Text message history entries for the lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationTextListResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/communication/email":{"get":{"tags":["Communication"],"summary":"Email History","description":"Returns email history entries for the given lead. Lead must belong to the caller's team.","operationId":"getCommunicationEmail","parameters":[{"name":"leadId","in":"query","description":"ID of the lead whose email history to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"offset","in":"query","description":"Zero-based index of the first entry to return.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"limit","in":"query","description":"Number of entries per page.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":10},"example":10},{"name":"currentId","in":"query","description":"This parameter is used for page turning. When searching by ID is invoked, the interface would starts from this ID, and retrieve data sequentially. It is recommended to use this parameter as a replacement for offset to turn the page within the limit.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Email history entries for the lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationEmailListResponse"}}}},"404":{"description":"Lead does not exist or is outside the caller's team (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/communication/call":{"get":{"tags":["Communication"],"summary":"Call History","description":"Returns call history entries for the given lead. Lead must belong to the caller's team.","operationId":"getCommunicationCall","parameters":[{"name":"leadId","in":"query","description":"ID of the lead whose call history to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"offset","in":"query","description":"Zero-based index of the first entry to return.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"limit","in":"query","description":"Number of entries per page.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":10},"example":10},{"name":"currentId","in":"query","description":"This parameter is used for page turning. When searching by ID is invoked, the interface would starts from this ID, and retrieve data sequentially. It is recommended to use this parameter as a replacement for offset to turn the page within the limit.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist or is outside the caller's team (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Call history entries for the lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationCallListResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/communication/call/v2":{"get":{"tags":["Communication"],"summary":"List call history of a lead (v2)","description":"Returns call history entries for the given lead, including additional event types not covered by the v1 variant. Lead must belong to the caller's team.","operationId":"getCommunicationCallV2","parameters":[{"name":"leadId","in":"query","description":"ID of the lead whose call history to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"offset","in":"query","description":"Zero-based index of the first entry to return.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"limit","in":"query","description":"Number of entries per page.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":10},"example":10},{"name":"currentId","in":"query","description":"This parameter is used for page turning. When searching by ID is invoked, the interface would starts from this ID, and retrieve data sequentially. It is recommended to use this parameter as a replacement for offset to turn the page within the limit.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Call history entries for the lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationCallV2ListResponse"}}}},"404":{"description":"Lead does not exist or is outside the caller's team (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/calls":{"get":{"tags":["Calls"],"summary":"List calls of a lead","description":"Returns call records attached to the given lead, with pagination metadata.\n\nNotes:\n- Sales Agent AI calls are included; their id is the call's communication (timeline) id, not a dialer call id, so use GET /v2.0/communication/call/{id} for one of them rather than GET /v1.0/calls/{callId}.\n- leadId is required and must be > 0; otherwise 404 LEAD_NOT_FOUND.\n- Caller must have manage permission on the lead; otherwise 400 PERMISSION_DENIED.\n- total in _metadata reflects the full result size before pagination.","operationId":"getList","parameters":[{"name":"limit","in":"query","description":"Number of results to return per page.","required":false,"schema":{"minimum":1,"type":"integer","format":"int32","default":10},"example":10},{"name":"offset","in":"query","description":"Zero-based index of the first entry to return.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32","default":0},"example":0},{"name":"leadId","in":"query","description":"ID of the lead whose calls to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Page of call records with pagination metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallListResponseV1"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"leadId is missing, <= 0, or does not exist (20006 LEAD_NOT_FOUND).","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Caller has no access to the lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/calls/{callId}":{"get":{"tags":["Calls"],"summary":"Get a call by ID","description":"Returns a single call record by ID. Caller must have manage permission on the lead the call belongs to; otherwise 400 PERMISSION_DENIED.","operationId":"get_2","parameters":[{"name":"callId","in":"path","description":"ID of the call.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Call does not exist, or caller has no access to the owning lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Call record retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetailResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist (20006 LEAD_NOT_FOUND).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/call/url/{callId}":{"get":{"tags":["Calls"],"summary":"Get a call recording URL","description":"Returns a temporary download URL for the audio recording of a call.\n\nNotes:\n- The URL is valid for 1 hour.\n- Caller must have manage permission on the lead this call belongs to; otherwise 400 PERMISSION_DENIED is returned.\n- When the call has no recording available, the 'url' field is an empty string.","operationId":"getCallRecordUrl","parameters":[{"name":"callId","in":"path","description":"ID of the call.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Call does not exist, or caller has no access to the owning lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Recording URL retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallUrlResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist (20006 LEAD_NOT_FOUND).","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/v1.0/appts":{"get":{"tags":["Tasks & Appointments"],"summary":"List Appointments","description":"Returns appointments attached to the given lead. Caller must have manage permission on the lead.","operationId":"list_5","parameters":[{"name":"leadId","in":"query","description":"ID of the lead whose appointments to return.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":100001},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Lead does not exist (20006 LEAD_NOT_EXIST).","content":{"application/json":{"schema":{"type":"string"}}}},"200":{"description":"Appointments for the lead.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Appointment"}}}}},"400":{"description":"Caller has no access to the lead (20017 PERMISSION_DENIED).","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["o-auth-metadata-controller"],"operationId":"authorizationServerMetadata","parameters":[{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationServerMetadata"}}}}}}},"/v1.0/webhook/{subscribeId}":{"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","description":"Deletes a webhook subscription by ID. Only the user who created the subscription can delete it. The response body is empty.","operationId":"delete","parameters":[{"name":"subscribeId","in":"path","description":"ID of the webhook subscription to delete.","required":true,"schema":{"minimum":1,"type":"integer","format":"int64"},"example":563172647619608},{"name":"Authorization","in":"header","description":"Bearer [access_token]","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"application/json","required":true,"schema":{"type":"string"},"example":"application/json"}],"responses":{"401":{"description":"Missing or invalid authentication token."},"400":{"description":"Subscription does not exist (WEBHOOK_DELETE_NOT_EXIST) or was not created by the caller (WEBHOOK_DELETE_NO_AUTHORITY)."},"200":{"description":"Webhook deleted successfully. No response body."},"500":{"description":"Internal server error."}}}}},"components":{"schemas":{"StopWorkingLeadResultV2":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the stop was accepted and the Sales Agent no longer works the lead. False when the stop could not be completed; check the lead with GET /v2.0/sales-agents/by-lead and retry","example":true}},"description":"Outcome of stopping a Sales Agent working a lead"},"Page":{"required":["pageId"],"type":"object","properties":{"pageId":{"type":"integer","description":"Page id on the caller's website.","format":"int64","example":123456},"title":{"type":"string","description":"SEO title, at most 255 characters.","example":"{{Brand Name}} | Homes for Sale in Austin"},"description":{"type":"string","description":"Meta description, at most 1000 characters."},"keywords":{"type":"string","description":"Meta keywords, comma separated, at most 500 characters."}},"description":"One page. Omit a field to leave it unchanged; an empty string clears it. Send the raw template text: variables such as `{{Brand Name}}` must be kept as they are, never replaced by the text they render to. Values must not contain `<`, `>` or `\"`."},"WebsitePageSeoUpdateRequest":{"type":"object","properties":{"pages":{"maxItems":10,"minItems":1,"type":"array","description":"1-10 pages, each listed once.","items":{"$ref":"#/components/schemas/Page"}}},"description":"Pages whose SEO title, meta description or keywords to change."},"PageSeoResult":{"type":"object","properties":{"pageId":{"type":"integer","format":"int64"},"path":{"type":"string"},"status":{"type":"string"},"before":{"$ref":"#/components/schemas/PageSeoValues"},"after":{"$ref":"#/components/schemas/PageSeoValues"}}},"PageSeoValues":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"keywords":{"type":"string"}}},"UpdatePageSeoResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/PageSeoResult"}}}},"ParticipantsRequestV2":{"type":"object","properties":{"agents":{"type":"array","description":"Lofty user IDs of the agents attending. Each must be a member of the caller's team. Replaces the current agent attendees when supplied.","example":[844775556213479],"items":{"type":"integer","description":"Lofty user IDs of the agents attending. Each must be a member of the caller's team. Replaces the current agent attendees when supplied.","format":"int64"}},"leads":{"type":"array","description":"Lead IDs attending in addition to the entry's own lead. The caller must be able to manage each lead. Replaces the current extra lead attendees when supplied.","example":[1149834734607512],"items":{"type":"integer","description":"Lead IDs attending in addition to the entry's own lead. The caller must be able to manage each lead. Replaces the current extra lead attendees when supplied.","format":"int64"}}},"description":"Extra attendees of the appointment. Ignored for plain tasks."},"UpdateTaskRequestV2":{"type":"object","properties":{"content":{"type":"string","description":"Description of the task","example":"Send an email to my lead"},"startAt":{"type":"string","description":"When this task/appointment should start. ISO8601 format in specified timezone, e.g., '2026-03-01T15:00:00-08:00'","example":"2026-03-01T15:00:00-08:00"},"endAt":{"type":"string","description":"When this task/appointment should end. ISO8601 format in specified timezone, e.g., '2026-03-01T16:00:00-08:00'. For regular tasks, this represents the deadline","example":"2026-03-01T16:00:00-08:00"},"timeZoneCode":{"type":"string","description":"Timezone code for this task/appointment","example":"America/Los_Angeles"},"address":{"type":"string","description":"Address/location for appointment type tasks","example":"123 Main St, Los Angeles, CA"},"assignedRoleId":{"type":"integer","description":"Lead role the task is assigned to, custom roles included. Takes priority over assignedRole. Must be a role somebody holds on this lead, the same list the Assign To dropdown shows; 400 otherwise. Omit it to keep using assignedRole.","format":"int32","example":10},"ownerUserId":{"type":"integer","description":"Lofty user ID owning the appointment. Must be a member of the caller's team. Omit it and the caller owns the appointment, as before. Ignored for plain tasks.","format":"int64","example":844775556213479},"participants":{"$ref":"#/components/schemas/ParticipantsRequestV2"}},"description":"Partial update payload. Only non-null fields are applied."},"MessageResponse":{"type":"object","properties":{"message":{"type":"string","description":"Result message","example":"Operation successful"}},"description":"Generic message response"},"CalendarUpdateRequestV2":{"type":"object","properties":{"content":{"type":"string","description":"Updated content/description"},"startAt":{"type":"string","description":"Updated start time in ISO8601 format. Preferred over startAtMs when both are provided."},"endAt":{"type":"string","description":"Updated end time in ISO8601 format. Preferred over endAtMs when both are provided."},"startAtMs":{"type":"integer","description":"Updated start time as Unix timestamp in milliseconds. Used when startAt is not provided.","format":"int64"},"endAtMs":{"type":"integer","description":"Updated end time as Unix timestamp in milliseconds. Used when endAt is not provided.","format":"int64"},"timeZoneCode":{"type":"string","description":"Updated timezone code"},"reminderType":{"type":"string","description":"Updated reminder type"},"reminderTime":{"type":"string","description":"Updated reminder time"},"leadId":{"type":"integer","description":"Updated lead ID","format":"int64"},"address":{"type":"string","description":"Updated address (for APPOINTMENT)"},"assignedRoleId":{"type":"integer","description":"Lead role the task is assigned to, custom roles included. Takes priority over assignedRole. Must be a role somebody holds on this lead, the same list the Assign To dropdown shows; 400 otherwise. Omit it to keep using assignedRole.","format":"int32","example":10},"ownerUserId":{"type":"integer","description":"Lofty user ID owning the appointment. Must be a member of the caller's team. Omit it and the caller owns the appointment, as before. Ignored for plain tasks.","format":"int64","example":844775556213479},"participants":{"$ref":"#/components/schemas/ParticipantsRequestV2"}},"description":"Partial update payload; only non-empty fields are applied."},"CalendarMessageResponseEnvelope":{"type":"object","properties":{"message":{"type":"string","description":"Result message for the calendar operation.","example":"Calendar updated successfully"}},"description":"Simple message envelope used by PUT / DELETE / finish / unfinish calendar endpoints."},"TaskRequest":{"required":["assignedRole","content","deadline","leadId","type"],"type":"object","properties":{"content":{"type":"string","description":"Description of the task.","example":"Send an email to my lead"},"leadId":{"type":"integer","description":"ID of the lead this task belongs to.","format":"int64","example":563172647619608},"deadline":{"type":"integer","description":"Deadline of the task, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"type":{"type":"string","description":"Type of the task.","example":"Call","enum":["Other","Call","Email","Text"]},"assignedRole":{"type":"string","description":"Role the task is assigned to.","example":"Agent","enum":["Agent","Assistant"]},"finishFlag":{"type":"boolean","description":"When true on update, the task is marked completed and other fields are ignored.","example":true,"default":false}},"description":"Task payload."},"ActiveHours":{"type":"object","properties":{"activeDays":{"type":"array","description":"Active day list, between 1 and 7","example":[1,2,3,4,5],"items":{"type":"integer","format":"int32","example":1}},"hoursStart":{"type":"integer","description":"Active hours start, between 0 and 23","format":"int32"},"hoursEnd":{"type":"integer","description":"Active hours end, between 0 and 23","format":"int32"}},"description":"Active hours setting"},"RoutingRuleRequest":{"type":"object","properties":{"id":{"type":"integer","description":"Rule id","format":"int64"},"activeHours":{"$ref":"#/components/schemas/ActiveHours"},"routingStrategy":{"$ref":"#/components/schemas/RoutingStrategy"}},"description":"Routing rule payload. id is required."},"RoutingStrategy":{"type":"object","properties":{"strategyType":{"type":"integer","description":"Strategy type","format":"int32"},"groupId":{"type":"integer","description":"Only lead pond are affected","format":"int64"},"groupName":{"type":"string","description":"Edit method don't need this params"},"touchMinutes":{"type":"integer","description":"Only next up and blast alert are affected","format":"int32"},"memberWeights":{"type":"object","properties":{"memberId":{"type":"integer","description":"Member id","format":"int64"},"firstName":{"type":"string","description":"Member first name, edit don't need this param"},"lastName":{"type":"string","description":"Member last name, edit don't need this param"},"weight":{"type":"integer","description":"Member weight","format":"int32"}},"description":"Except for the lead pond type"}},"description":"Active hours setting"},"SupplementRoutingRuleRequest":{"type":"object","properties":{"roleId":{"type":"integer","description":"Role id, This parameter is required when type == 4","format":"int32"},"strategyType":{"type":"integer","description":"Strategy type","format":"int32"},"touchMinutes":{"type":"integer","description":"Only next up and blast alert are affected","format":"int32"},"assigneeAgentId":{"type":"integer","description":"Only default assignee are affected","format":"int64"},"assigneeGroupId":{"type":"integer","description":"Only default assignee and routing type is AGENT_LEAD are affected","format":"int64"}},"description":"Supplement routing rule payload."},"OfficeRequest":{"type":"object","properties":{"id":{"type":"integer","description":"Office ID. Required on update (POST /v1.0/org/office); ignored on create.","format":"int64","example":563172647619608},"parentId":{"type":"integer","description":"Parent office ID. Use 0 or null when creating a top-level office under the team.","format":"int64","example":563172647619608},"name":{"type":"string","description":"Office name.","example":"Downtown Branch"},"phone":{"type":"string","description":"Office phone number, digits only.","example":"4155551234"},"phoneCode":{"type":"string","description":"Phone country calling code without the leading +.","example":"1"},"phoneCountry":{"type":"string","description":"ISO 3166-1 alpha-2 country code for the phone.","example":"US"},"email":{"type":"string","description":"Office contact email.","example":"downtown@lofty.com"},"city":{"type":"string","description":"City.","example":"San Francisco"},"state":{"type":"string","description":"State or province.","example":"CA"},"zipcode":{"type":"string","description":"Postal / ZIP code.","example":"94103"},"streetAddress":{"type":"string","description":"Street address line.","example":"456 Mission St"},"allowManageSub":{"type":"boolean","description":"Whether members of this office can manage its sub-offices.","example":true}},"description":"Office payload. id is required to identify the office to update."},"OrganizationOpResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Business result code. 0 indicates success.","format":"int32","example":0},"message":{"type":"string","description":"Human-readable message. 'success' on success; error description otherwise.","example":"success"},"data":{"type":"object","description":"Operation result payload, if any."}},"description":"Response envelope for POST /v1.0/org/company, PUT /v1.0/org/office and POST /v1.0/org/office. Carries a business code and message; data may be absent on pure acknowledgement responses."},"NoteRequest":{"required":["content","isPin","leadId"],"type":"object","properties":{"content":{"maxLength":2000,"type":"string","description":"Note content. Silently truncated to 2000 characters.","example":"Discussed Austin inventory, will send pre-approval doc tomorrow."},"leadId":{"type":"integer","description":"ID of the lead this note belongs to. Must be accessible to the caller.","format":"int64","example":563172647619608},"isPin":{"type":"boolean","description":"Whether to pin this note to the top of the lead's timeline.","example":false,"default":false}},"description":"Note payload."},"Commission":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"splitPayType":{"type":"string","enum":["TEAM","AGENT","VENDOR_PARTNER","LEAD","OTHER","BROKERAGE","UPLINE"]},"splitPayTo":{"type":"integer","format":"int64"},"splitPayToName":{"type":"string"},"payType":{"type":"string","enum":["TEAM","AGENT","VENDOR_PARTNER","LEAD","OTHER","BROKERAGE","UPLINE"]},"payTo":{"type":"integer","format":"int64"},"payToName":{"type":"string"},"value":{"type":"integer","format":"int64"},"calculateType":{"type":"string","enum":["PERCENT","AMOUNT"]},"desc":{"type":"string"}}},"Commissions":{"type":"object","properties":{"preSplit":{"type":"array","items":{"$ref":"#/components/schemas/Commission"}},"split":{"type":"array","items":{"$ref":"#/components/schemas/Commission"}},"postSplit":{"type":"array","items":{"$ref":"#/components/schemas/Commission"}}},"description":"Commission structure (preSplit / split / postSplit). See POST /v1.0/leads/{leadId}/transaction description for validation rules."},"CustomAttribute":{"required":["attributeName","attributeType","value"],"type":"object","properties":{"attributeName":{"type":"string","description":"The name of this custom field"},"attributeType":{"type":"string","description":"The type of the field","example":"number, text, date, anniversary_date, single_select, multi_select, percentage, currency"},"value":{"type":"string","description":"The content of the field for lead, value for multi-select,such as \"[\\\"item1\\\",\\\"item2\\s\",...]\" .It's unnecessary when adding a new custom field for team"},"params":{"type":"string","description":"options for select, such as {\"option\":[\"item1\",\"item2\",...]}"}},"description":"User customized field"},"CustomFieldRequest":{"type":"object","properties":{"id":{"type":"integer","description":"Custom field id","format":"int64"},"value":{"type":"string","description":"Custom field value For multi_select, the format is:[\"Item1\",\"Item2\", ...]"}},"description":"Custom field values; full-coverage update or insertion. See GET /v1.0/transaction/customfields for the team's custom field definitions."},"EditLeadRequest":{"type":"object","properties":{"cannotText":{"type":"boolean","description":"false: can send message to the lead"},"cannotCall":{"type":"boolean","description":"false: can call to the lead"},"cannotEmail":{"type":"boolean","description":"false: can email to the lead"},"firstName":{"type":"string","description":"The first/given name of the lead \nCaution: Max limit 30 characters. If you exceed the limit, the import will succuss, but only import 30 characters in front.","example":"Bob"},"lastName":{"type":"string","description":"The last/family name of the lead \nCaution: Max limit 30 characters. If you exceed the limit, the import will succuss, but only import 30 characters in front.","example":"Li"},"emails":{"type":"array","description":"A list of email addresses associated with the lead","example":["jane.doe@example.com","jdoe-work@company.com"],"items":{"type":"string","example":"jane.doe@example.com"}},"phones":{"type":"array","description":"A list of phone numbers associated with the lead. (No more than 20 characters per phone)","example":["+14155551234","+12125559876"],"items":{"type":"string","example":"+14155551234"}},"leadTypes":{"type":"array","description":"Types of lead, expressed by ID. Type ID : Other (-1),  Seller (1), Buyer (2), Renter (5), Investor (6), Agent (7),Homeowner (8), Landlord (9)","example":[2,5],"items":{"type":"integer","format":"int32","example":2}},"assignedUserId":{"type":"integer","description":"Id of the agent assigned to this contact","format":"int64","example":10000000514},"streetAddress":{"type":"string","description":"The streetAddress associated with the lead. Deprecated: please use the streetAddress field in property instead.","example":"The White House,1600 Pennsylvania Avenue NW","deprecated":true},"city":{"type":"string","description":"The city associated with the lead. Deprecated: please use the city field in property instead.","example":"Washington DC","deprecated":true},"state":{"type":"string","description":"The state associated with the lead. Deprecated: please use the state field in property instead.","example":"Washington DC","deprecated":true},"zipCode":{"type":"string","description":"ZipCode. Deprecated: please use the zipCode field in property instead.","example":"20500","deprecated":true},"referredBy":{"type":"string","description":"The referee of the lead","example":"Jeremy Kelly"},"isHidden":{"type":"boolean","description":"The lead is hidden or not","example":false},"stage":{"type":"string","description":"The stage the lead is in, less than 20 characters","example":"Pending"},"groups":{"type":"array","description":"The groups the lead is in \n Caution: Max limit 30 characters.If you exceed the limit,the import will success , but only import 30 characters in front. deprecated, use segments instead.","example":["VIP Clients","Open House Feb"],"deprecated":true,"items":{"type":"string","example":"VIP Clients"}},"segments":{"type":"array","description":"The segments the lead is in \n Caution: Max limit 30 characters.If you exceed the limit,the import will success , but only import 30 characters in front.","example":["First-Time Buyers","Downtown Area"],"items":{"type":"string","example":"First-Time Buyers"}},"tags":{"type":"array","description":"The tags associated with the lead. All existing tags will be updated based on this call \n Caution: Max limit 64 characters.If you exceed the limit,the import will success , but only import 64 characters in front.","example":["Hot Lead","Zillow"],"items":{"type":"string","example":"Hot Lead"}},"tagsAdd":{"type":"array","description":"The tags associated with the lead. All existing tags will be retained, only add new tags base on this call\n Caution: Max limit 64 characters. If you exceed the limit, the import will success, but only import 64 characters in front.","example":["Referral","Pre-Approved"],"items":{"type":"string","example":"Referral"}},"tagsRemove":{"type":"array","description":"Tags to remove from the lead, by literal name. Only tags that are already on the lead are affected — a name not currently on the lead is ignored (so a brand-new tag introduced by `tags`/`tagsAdd` in the same request is not affected). Names are matched literally, so a tag named \"*\" is removed like any other. To remove ALL tags use the `clearAllTags` flag instead. Applied after `tags`/`tagsAdd`; it does not change their behavior. Omit it to leave tags unchanged.","example":["Hot Lead"],"items":{"type":"string","example":"Hot Lead"}},"clearAllTags":{"type":"boolean","description":"Set to `true` to remove ALL tags from the lead. Takes precedence over `tags` / `tagsAdd` / `tagsRemove`. Defaults to `false` (no change).","example":false},"source":{"type":"string","description":"The source of the lead","example":"Open House"},"inquiry":{"$ref":"#/components/schemas/LeadInquiry"},"property":{"$ref":"#/components/schemas/LeadProperty"},"customAttributeList":{"type":"array","description":"User customized field","items":{"$ref":"#/components/schemas/CustomAttribute"}},"birthday":{"type":"string","description":"The birthday of the lead(pattern:MMM d, yyyy)","example":"Jun 5, 2001"},"buyingTimeFrame":{"type":"string","description":"buying time frame, `1-3`, `3-6`, `6-12`, `12+`, `Just Looking`, `Refinancing`.","example":"6-12"},"preQual":{"type":"string","description":"Pre-qual, `Yes` or `No`.","example":"Yes"},"houseToSell":{"type":"string","description":"House to Sell, `Yes` or `No`.","example":"Yes"},"fthb":{"type":"string","description":"first time home buyer, `Yes` or `No`.","example":"Yes"},"withBuyerAgent":{"type":"string","description":"With buyer Agent, `Yes` or `No`.","example":"Yes"},"sellingTimeFrame":{"type":"string","description":"selling time frame, `1-3`, `3-6`, `6-12`, `12+`, `Just Looking`, `Refinancing`.","example":"1-3"},"mortgage":{"type":"string","description":"Mortgage, `Yes` or `No`.","example":"Yes"},"buyHouse":{"type":"string","description":"Buy a house, `Yes` or `No`.","example":"Yes"},"withListingAgent":{"type":"string","description":"With listing agent, `Yes` or `No`.","example":"Yes"},"leadFamilyMemberList":{"type":"array","description":"A list of family members associated with the lead. You can add up to 4 family members.","items":{"$ref":"#/components/schemas/LeadFamilyMember"}},"language":{"type":"string","description":"The lead's abbreviated language, `en`, `fr`, `de`, `es`, `zh-CN`, `zh-TW`, `ja`","example":"en"},"ownershipId":{"type":"integer","description":"The entity ID for the ownership scope. Required when `ownershipScope` is `OFFICE` (pass the office ID) or `PERSONAL` (pass the agent's user ID). Ignored when `ownershipScope` is `TEAM`.","format":"int64"},"ownershipScope":{"type":"string","description":"Controls the visibility scope of the lead. `TEAM` — Account-wide: visible to all users in this Lofty client account. `OFFICE` — visible only within the specified office (requires `ownershipId`). `PERSONAL` — visible only to the specified agent (requires `ownershipId`). Note: `TEAM` refers to the entire client account (the organization), not the Lofty \"Team add-on\" product.","example":"TEAM"},"unsubscription":{"type":"boolean","description":"Unsubscription the email"},"leadTransaction":{"$ref":"#/components/schemas/LeadTransaction"},"pondId":{"type":"integer","description":"ID of the lead pond to move this lead into, as returned by `GET /v1.0/team-features/lead-ponds`. The pond replaces the lead's agent assignee. Cannot be combined with `assignedUserId` or with `deduplicate=true`.","format":"int64","example":12345}},"description":"Lead update payload."},"LeadFamilyMember":{"required":["firstName"],"type":"object","properties":{"relationship":{"type":"string","description":"The relationship of this family member to primary lead. Example: Husband"},"firstName":{"type":"string","description":"The first name of the family member"},"lastName":{"type":"string","description":"The last name of the family member"},"phones":{"type":"array","description":"A list of phone numbers associated with the family member. (No more than 20 characters per phone)","example":["+14155551234"],"items":{"type":"string","example":"+14155551234"}},"emails":{"type":"array","description":"A list of email addresses associated with the lead","example":["spouse@example.com"],"items":{"type":"string","example":"spouse@example.com"}},"birthday":{"type":"string","description":"The birthday of the family member(pattern:MMM d, yyyy)"}},"description":"A list of family members associated with the lead"},"LeadInquiry":{"type":"object","properties":{"priceMin":{"type":"integer","description":"Price range lower end","format":"int64","example":1},"priceMax":{"type":"integer","description":"Price range higher end","format":"int64","example":10000000},"propertyType":{"type":"array","description":"Property types: `Single Family Home`, `Multi-Family`, `Condo`, `Townhouse`, `Mobile Home`, `Manufactured Home`, `Vacant Land`, `Commercial`.","example":["Single Family Home","Condo"],"items":{"type":"string","example":"Single Family Home"}},"bedroomsMin":{"type":"integer","description":"Bed Rooms","format":"int32","example":1},"bathroomsMin":{"type":"string","description":"Bath Rooms","example":"1"},"locations":{"type":"array","description":"Areas the lead is interested in. Each entry is a Location object (city, stateCode, zipCode, county, streetAddress or description). Used by routing rules when the lead's leadTypes do not include Seller (1).","example":[{"city":"Austin","stateCode":"TX"}],"items":{"$ref":"#/components/schemas/Location"}},"id":{"type":"integer","format":"int64"},"leadUserId":{"type":"integer","format":"int64"},"bedroomsMax":{"type":"integer","format":"int32"},"bathroomsMax":{"type":"string"},"modifyByAgent":{"type":"boolean"},"createTime":{"type":"string","format":"date-time"},"updateTime":{"type":"string","format":"date-time"},"defaultValue":{"type":"boolean"}},"description":"LeadInquirys"},"LeadProperty":{"type":"object","properties":{"price":{"type":"integer","description":"The price\nApplies to lead routing only if the leadType field is Seller(1)","format":"int64","example":100000},"state":{"type":"string","description":"The state\nApplies to lead routing only if the leadType field is Seller(1)","example":"California"},"city":{"type":"string","description":"The city\nApplies to lead routing only if the leadType field is Seller(1)","example":"New York"},"streetAddress":{"type":"string","description":"The street address\nApplies to lead routing only if the leadType field is Seller(1)","example":"22348 Regnart RD"},"zipCode":{"type":"string","description":"The zip code\nApplies to lead routing only if the leadType field is Seller(1)","example":"25401"},"county":{"type":"string","description":"The county\nApplies to lead routing only if the leadType field is Seller(1)"},"propertyType":{"type":"string","description":"Property type: `Single Family Home`, `Multi-Family`, `Condo`, `Townhouse`, `Mobile Home`, `Manufactured Home`, `Vacant Land`, `Commercial`.","example":"Single Family Home"},"bedrooms":{"type":"integer","description":"The bed rooms.","format":"int32","example":3},"bathrooms":{"type":"number","description":"The bath rooms.","format":"double","example":2},"squareFeet":{"type":"integer","description":"The square feet.","format":"int64","example":100},"lotSize":{"type":"number","description":"The lot size (acreage).","format":"double","example":26.33},"parkingSpace":{"type":"integer","description":"The parking space.","format":"int64","example":1},"floors":{"type":"integer","description":"The floors.","format":"int32","example":1},"mailAddress":{"type":"boolean","description":"If set to true, the address is a mailing address; otherwise, it is a property address."},"id":{"type":"integer","description":"The property ID. Required when updating an existing mailing address or property address. If not provided, a new address will be created.","format":"int64"},"leadUserId":{"type":"integer","format":"int64"},"listingId":{"type":"string"},"autoListingId":{"type":"integer","format":"int64"},"label":{"type":"string"},"note":{"type":"string"},"listingStatus":{"type":"string"},"labelList":{"type":"string"},"pictureUrl":{"type":"string"},"siteListingUrl":{"type":"string"},"labelType":{"type":"string"},"priceMax":{"type":"integer","description":"The max price\nApplies to lead routing only if the leadType field is Seller(1)","format":"int64","writeOnly":true,"example":10000000},"priceMin":{"type":"integer","description":"The min price\nApplies to lead routing only if the leadType field is Seller(1)","format":"int64","writeOnly":true,"example":100000}},"description":"Lead property or mailing address details"},"LeadTransaction":{"required":["transactionName"],"type":"object","properties":{"created":{"type":"integer","description":"Transaction creation timestamp, in milliseconds since Unix epoch (UTC). Do not supply on create.","format":"int64","readOnly":true,"example":1518078026000},"updated":{"type":"integer","description":"Transaction last-modified timestamp, in milliseconds since Unix epoch (UTC). Do not supply on create or update.","format":"int64","readOnly":true,"example":1518078026000},"transactionId":{"type":"integer","description":"Transaction ID. Do not supply on create.","format":"int64","readOnly":true,"example":10001},"transactionName":{"type":"string","description":"Property address or deal name. Required on create. Must not be blank and must not contain '<' or '>' characters.","example":"123 Main St"},"leadName":{"type":"string","description":"Name of the lead this transaction belongs to. Ignored if supplied in a request body.","example":"Bob"},"assignedAgent":{"type":"integer","description":"User ID of the agent this transaction is assigned to. Ignored if supplied in a request body.","format":"int64","example":100001},"transactionType":{"type":"string","description":"Transaction type. Case-sensitive; must be one of the supported values. Values not matching the team's configured pipeline types fall back silently to the first pipeline (typically 'Purchase / Pre-contract'); always pass a valid type to avoid this silent behavior.","example":"Purchase","enum":["Purchase","Listing","Lease","Other"]},"homePrice":{"type":"number","description":"Home price of the transaction.","example":1000000.0},"transactionStatus":{"type":"string","description":"Transaction status name. Must match one of the statuses configured in the team's pipeline for the given transactionType; unmatched values silently fall back to the first status of that type.","example":"Pre-contract"},"expectedCloseDate":{"type":"integer","description":"Expected close date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"closeDate":{"type":"integer","description":"Actual close date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"commissionRate":{"type":"number","description":"Commission rate, expressed as a percentage (e.g. 3 for 3%).","example":3},"gci":{"type":"number","description":"Gross Commission Income (GCI) of the transaction.","example":5000.0},"teamRevenue":{"type":"number","description":"Portion of the GCI attributed to the team.","example":1000.0},"agentRevenue":{"type":"number","description":"Portion of the GCI attributed to the agent.","example":4000.0},"appointmentDate":{"type":"integer","description":"Appointment date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"agreementSignedDate":{"type":"integer","description":"Agreement-signed date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"offerDate":{"type":"integer","description":"Offer date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"contractDate":{"type":"integer","description":"Contract date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"appraisalDate":{"type":"integer","description":"Appraisal date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"homeInspectionDate":{"type":"integer","description":"Home-inspection date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"escrowDate":{"type":"integer","description":"Escrow date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"expiration":{"type":"integer","description":"Expiration date (listing / contract), in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"customFields":{"type":"array","description":"Custom field values; full-coverage update or insertion. See GET /v1.0/transaction/customfields for the team's custom field definitions.","items":{"$ref":"#/components/schemas/CustomFieldRequest"}},"commissions":{"$ref":"#/components/schemas/Commissions"}}},"Location":{"type":"object","properties":{"stateCode":{"type":"string","description":"The state code of city\nApplies to lead routing if the leadType field is not Seller(1) in the lead creation request.","example":"CA"},"city":{"type":"string","description":"The city\nApplies to lead routing if the leadType field is not Seller(1) in the lead creation request.","example":"Palm Desert"},"zipCode":{"type":"string","description":"The zip code\nApplies to lead routing if the leadType field is not Seller(1) in the lead creation request.","example":"92211"},"county":{"type":"string","description":"The county\nApplies to lead routing if the leadType field is not Seller(1) in the lead creation request."},"streetAddress":{"type":"string","description":"The street address\nApplies to lead routing if the leadType field is not Seller(1) in the lead creation request."},"description":{"type":"string","description":"Description of location.","example":"other"}},"description":"Areas the lead is interested in. Each entry is a Location object (city, stateCode, zipCode, county, streetAddress or description). Used by routing rules when the lead's leadTypes do not include Seller (1).","example":[{"city":"Austin","stateCode":"TX"}]},"LeadIdResponse":{"type":"object","properties":{"leadId":{"type":"integer","description":"ID of the lead.","format":"int64","example":651095960136641}},"description":"Response containing the lead ID."},"GeoPoint":{"type":"object","properties":{"lat":{"maximum":90,"minimum":-90,"type":"number","description":"Latitude, -90 to 90","format":"double","example":37.97717892480743},"lng":{"maximum":180,"minimum":-180,"type":"number","description":"Longitude, -180 to 180","format":"double","example":-122.11879621484377}},"description":"Centre of the search circle"},"MapCircle":{"type":"object","properties":{"center":{"$ref":"#/components/schemas/GeoPoint"},"radius":{"type":"number","description":"Radius, in the unit given by unit. Must be positive; when writing, at most 100 miles or 160 kilometers","format":"double","example":3},"unit":{"type":"string","description":"Unit the radius is expressed in: miles or kilometers, in any letter case and stored lower case. Optional when writing - omitted or blank means miles. Any other value is rejected","example":"miles","enum":["miles","kilometers"]}},"description":"Circles of a radius-based search; empty when the search is not radius-based. When writing: not together with named locations"},"SavedSearchCriteria":{"type":"object","properties":{"locations":{"$ref":"#/components/schemas/SavedSearchLocations"},"priceMin":{"type":"integer","description":"Minimum list price. When writing: PROPERTY_ALERT only","format":"int64","nullable":true,"example":350000},"priceMax":{"type":"integer","description":"Maximum list price. When writing: PROPERTY_ALERT only","format":"int64","nullable":true,"example":600000},"soldPriceMin":{"type":"integer","description":"Minimum sold price. When writing: MARKET_SNAPSHOT only","format":"int64","nullable":true},"soldPriceMax":{"type":"integer","description":"Maximum sold price. When writing: MARKET_SNAPSHOT only","format":"int64","nullable":true},"bedsMin":{"type":"integer","description":"Minimum bedrooms","format":"int32","nullable":true,"example":3},"bedsMax":{"type":"integer","description":"Maximum bedrooms","format":"int32","nullable":true},"bathsMin":{"type":"number","description":"Minimum bathrooms","format":"double","nullable":true,"example":2},"bathsMax":{"type":"number","description":"Maximum bathrooms","format":"double","nullable":true},"sqftMin":{"type":"integer","description":"Minimum living area in square feet","format":"int32","nullable":true},"sqftMax":{"type":"integer","description":"Maximum living area in square feet","format":"int32","nullable":true},"lotSizeMin":{"type":"number","description":"Minimum lot size in square feet (one acre is 43560)","format":"double","nullable":true},"lotSizeMax":{"type":"number","description":"Maximum lot size in square feet (one acre is 43560)","format":"double","nullable":true},"yearBuiltMin":{"type":"integer","description":"Earliest year built","format":"int32","nullable":true},"yearBuiltMax":{"type":"integer","description":"Latest year built","format":"int32","nullable":true},"daysOnSite":{"type":"integer","description":"Only listings added within this many days. When writing: PROPERTY_ALERT only, above 0","format":"int32","nullable":true,"example":7},"daysSold":{"type":"integer","description":"Only listings sold within this many days. When writing: MARKET_SNAPSHOT only, above 0","format":"int32","nullable":true,"example":45},"listingType":{"type":"string","description":"Listing type filter as stored by the source site. Read only","nullable":true,"example":"all-listing"},"propertyTypes":{"type":"array","description":"Property types. When writing: values must match the options Lofty shows for the lead's site exactly, including letter case. A value that is not an option has no effect; one that differs only in case still filters but shows unselected on the CRM edit page","items":{"type":"string","example":"Single Family Residence"}},"propertySubTypes":{"type":"array","description":"Property sub types. When writing: values must match the options Lofty shows for the lead's site exactly, including letter case. A value that is not an option has no effect; one that differs only in case still filters but shows unselected on the CRM edit page","items":{"type":"string","description":"Property sub types. When writing: values must match the options Lofty shows for the lead's site exactly, including letter case. A value that is not an option has no effect; one that differs only in case still filters but shows unselected on the CRM edit page"}},"listingStatuses":{"type":"array","description":"Listing statuses. When writing: values must match the options Lofty shows for the lead's site exactly, including letter case. A value that is not an option has no effect; one that differs only in case still filters but shows unselected on the CRM edit page. Omitted means Active for a PROPERTY_ALERT and Sold for a MARKET_SNAPSHOT, whose list must include Sold","items":{"type":"string","example":"Active"}},"purchaseTypes":{"type":"array","description":"Whether the search targets for-sale or for-rent listings. When writing: PROPERTY_ALERT only; omitted means FOR_SALE","items":{"type":"string","description":"Whether the search targets for-sale or for-rent listings. When writing: PROPERTY_ALERT only; omitted means FOR_SALE","enum":["FOR_SALE","FOR_RENT"]}},"keywords":{"type":"array","description":"Free-text keywords","items":{"type":"string","description":"Free-text keywords"}},"includeOpenHouse":{"type":"boolean","description":"When true, only listings with an open house are matched. A search filter: whether the email shows open house details is includeOpenHouseInfo on the saved search. When writing: PROPERTY_ALERT only","nullable":true}},"description":"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."},"SavedSearchLocations":{"type":"object","properties":{"cities":{"type":"array","description":"Cities","items":{"type":"string","description":"Cities"}},"zipCodes":{"type":"array","description":"Zip codes","items":{"type":"string","description":"Zip codes"}},"excludedZipCodes":{"type":"array","description":"Zip codes explicitly excluded from the search","items":{"type":"string","description":"Zip codes explicitly excluded from the search"}},"counties":{"type":"array","description":"Counties","items":{"type":"string","description":"Counties"}},"neighborhoods":{"type":"array","description":"Neighborhoods, merging MLS-sourced and Lofty-maintained ones","items":{"type":"string","description":"Neighborhoods, merging MLS-sourced and Lofty-maintained ones"}},"subdivisions":{"type":"array","description":"Subdivisions","items":{"type":"string","description":"Subdivisions"}},"communities":{"type":"array","description":"Communities","items":{"type":"string","description":"Communities"}},"areas":{"type":"array","description":"MLS areas","items":{"type":"string","description":"MLS areas"}},"schoolDistricts":{"type":"array","description":"School districts","items":{"type":"string","description":"School districts"}},"schools":{"type":"array","description":"Named schools (elementary, middle and high combined). Read only: to write schools use elementarySchools, middleSchools and highSchools","items":{"type":"string","description":"Named schools (elementary, middle and high combined). Read only: to write schools use elementarySchools, middleSchools and highSchools"}},"elementarySchools":{"type":"array","description":"Elementary schools","items":{"type":"string","description":"Elementary schools"}},"middleSchools":{"type":"array","description":"Middle schools","items":{"type":"string","description":"Middle schools"}},"highSchools":{"type":"array","description":"High schools","items":{"type":"string","description":"High schools"}},"streetNames":{"type":"array","description":"Street names","items":{"type":"string","description":"Street names"}},"states":{"type":"array","description":"States","items":{"type":"string","description":"States"}},"mapPath":{"type":"array","description":"Vertices of a map-drawn search polygon; empty when the search is not map-drawn. When writing: 3 to 500 points, and not together with named locations","items":{"$ref":"#/components/schemas/GeoPoint"}},"mapCircles":{"type":"array","description":"Circles of a radius-based search; empty when the search is not radius-based. When writing: not together with named locations","items":{"$ref":"#/components/schemas/MapCircle"}}},"description":"Where the search looks. When writing: optional - omit it or send an empty object for a search without a location filter. Named locations (cities, zipCodes, counties, neighborhoods, subdivisions, communities, areas, schoolDistricts, elementarySchools, middleSchools, highSchools) and drawn ones (mapCircles, mapPath) cannot be used together."},"SavedSearchWriteRequest":{"type":"object","properties":{"category":{"type":"string","description":"Which emails the search sends. Required on create, cannot be changed on update.","example":"PROPERTY_ALERT","enum":["PROPERTY_ALERT","MARKET_SNAPSHOT"]},"name":{"maxLength":255,"type":"string","description":"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.","example":"Cary 3BR under 600k"},"alertFrequency":{"type":"string","description":"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.","example":"DAILY","enum":["INSTANTLY","DAILY","WEEKLY","BIWEEKLY","MONTHLY","NEVER"]},"schedule":{"type":"object","properties":{"SUN":{"type":"string","enum":["AM","PM"]},"MON":{"type":"string","enum":["AM","PM"]},"TUE":{"type":"string","enum":["AM","PM"]},"WED":{"type":"string","enum":["AM","PM"]},"THU":{"type":"string","enum":["AM","PM"]},"FRI":{"type":"string","enum":["AM","PM"]},"SAT":{"type":"string","enum":["AM","PM"]}},"description":"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":{"MON":"AM","THU":"AM"}},"criteria":{"$ref":"#/components/schemas/SavedSearchCriteria"},"recipientEmails":{"type":"array","description":"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.","items":{"type":"string","example":"jane@example.com"}},"emailSubject":{"maxLength":255,"type":"string","description":"Subject line of the alert emails, up to 255 characters; blank uses the default subject"},"sendCopyToAgent":{"type":"boolean","description":"Whether the assigned agent gets a copy of every alert email. Defaults on create to true."},"sendFirstEmailNow":{"type":"boolean","description":"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)."},"includeOpenHouseInfo":{"type":"boolean","description":"Whether the alert emails show the open house details of listings that have an open house. An email setting only: it does not change which listings match. Not the same as criteria.includeOpenHouse, which only matches listings that have an open house. Has an effect on a PROPERTY_ALERT only; true on a MARKET_SNAPSHOT is not saved and is listed in ignoredFields. Defaults on create to true for a PROPERTY_ALERT, false for a MARKET_SNAPSHOT, as in the CRM alert editor; omitted on update keeps the current value."},"useSupplement":{"type":"boolean","description":"When a scheduled email finds no new matching listing, fill it with listings that match the search and are already on the market, instead of sending nothing new. Has an effect on a PROPERTY_ALERT that is not INSTANTLY and whose listings are not hand-picked by the agent; true on any other saved search is not saved and is listed in ignoredFields. Defaults on create to true for a PROPERTY_ALERT that is not INSTANTLY and false otherwise, as in the CRM alert editor; omitted on update keeps the current value."}}},"SavedSearch":{"type":"object","properties":{"id":{"type":"integer","description":"Saved search id","format":"int64","example":88123456789},"leadId":{"type":"integer","description":"Id of the lead this search belongs to","format":"int64","example":651095960136641},"name":{"type":"string","description":"Name given to the search","example":"Cary 3BR under 600k"},"source":{"type":"string","description":"Who created the search","nullable":true,"enum":["AGENT_CREATED","LEAD_CREATED","SYSTEM_CREATED"]},"saleType":{"type":"string","description":"Which side of the transaction the search was built for","nullable":true,"enum":["SELLER","BUYER"]},"category":{"type":"string","description":"Which emails this search sends: PROPERTY_ALERT for buyer searches, MARKET_SNAPSHOT for seller searches","enum":["PROPERTY_ALERT","MARKET_SNAPSHOT"]},"status":{"type":"string","description":"ACTIVE unless alerts have been switched off for this search","enum":["ACTIVE","INACTIVE"]},"alertFrequency":{"type":"string","description":"Delivery cadence. INSTANTLY means real time, not disabled. NEVER means paused - by this API, by an agent or the lead, or automatically by Lofty after a long run of unopened emails; the search is kept and can be switched back on. TERMINATED and REFUSED are switched-off states left by older Lofty features: no email is sent, they can appear when reading but cannot be written.","enum":["NEVER","TERMINATED","REFUSED","INSTANTLY","DAILY","WEEKLY","BIWEEKLY","MONTHLY"]},"frequencyBeforePause":{"type":"string","description":"For an INACTIVE search, the cadence it ran at before it was switched off - what the resume endpoint restores. Null while active or when unknown","nullable":true,"enum":["NEVER","TERMINATED","REFUSED","INSTANTLY","DAILY","WEEKLY","BIWEEKLY","MONTHLY"]},"schedule":{"type":"object","description":"Delivery slots keyed by weekday, AM or PM","example":{"MON":"AM","WED":"AM"}},"recipientEmails":{"type":"array","description":"Email addresses receiving the alerts. Empty means the lead's main email address","items":{"type":"string","example":"jane@example.com"}},"emailSubject":{"type":"string","description":"Subject line of the alert emails; blank means the default subject","nullable":true},"sendCopyToAgent":{"type":"boolean","description":"Whether the assigned agent gets a copy of every alert email","nullable":true},"includeOpenHouseInfo":{"type":"boolean","description":"Whether the alert emails show the open house details of listings that have an open house. An email setting, not a filter: criteria.includeOpenHouse is the filter that only matches listings with an open house. Only PROPERTY_ALERT emails use it","nullable":true},"useSupplement":{"type":"boolean","description":"Whether a scheduled email that finds no new matching listing is filled with matching listings already on the market. Only PROPERTY_ALERT emails that are not INSTANTLY and not hand-picked use it","nullable":true},"lastSentAt":{"type":"string","description":"When the last alert email went out, ISO 8601 UTC","nullable":true,"example":"2026-08-25T13:00:00Z"},"createdAt":{"type":"string","description":"Creation time, ISO 8601 UTC","nullable":true,"example":"2025-11-02T18:22:31Z"},"updatedAt":{"type":"string","description":"Last update time, ISO 8601 UTC","nullable":true,"example":"2026-07-14T09:05:12Z"},"criteria":{"$ref":"#/components/schemas/SavedSearchCriteria"},"unmappedCriteria":{"type":"array","description":"Names of filters this API version does not model yet. Names only: the values are withheld because the underlying storage mixes in data that is not search intent. Use it to tell a partially understood search from a fully mapped one","items":{"type":"string","description":"Names of filters this API version does not model yet. Names only: the values are withheld because the underlying storage mixes in data that is not search intent. Use it to tell a partially understood search from a fully mapped one"}},"hasUnmappedCriteria":{"type":"boolean","description":"Whether unmappedCriteria is non-empty"}},"description":"The lead's saved searches"},"SavedSearchResponse":{"type":"object","properties":{"savedSearch":{"$ref":"#/components/schemas/SavedSearch"},"ignoredFields":{"type":"array","description":"Fields of the request that were not applied, each by its path: keys this API does not know or cannot write (criteria.basement, or id copied from a read), and useSupplement or includeOpenHouseInfo sent as true on a saved search they have no effect on. Everything else in the request was saved. Empty when every field was applied. Unrelated to unmappedCriteria, which lists stored filters this API does not model","items":{"type":"string","example":"criteria.basement"}}}},"IncomingTransaction":{"required":["id"],"type":"object","properties":{"id":{"type":"integer","description":"Lofty transaction ID to update. Required; used to look up the existing Lofty transaction and the Brokermint-link record in bm_task_item.","format":"int64","example":10001},"agentId":{"type":"integer","description":"Lofty user ID of the agent who will own the transaction. Overwrites the existing ownerId.","format":"int64","example":100001},"agentName":{"type":"string","description":"Agent's display name. Currently ignored by the handler.","example":"Jane Doe"},"address":{"type":"string","description":"Street address of the property. Overwrites the stored property address when provided.","example":"123 Main St"},"city":{"type":"string","description":"City of the property. Overwrites the stored value when provided.","example":"Los Angeles"},"state":{"type":"string","description":"State or province of the property. Overwrites the stored value when provided.","example":"CA"},"zip":{"type":"string","description":"Postal / ZIP code of the property. Overwrites the stored value when provided.","example":"90012"},"status":{"type":"string","description":"Transaction status from Brokermint. Only the values \"Closed\" and \"Cancelled\" trigger a pipeline status change on the Lofty side; any other value is silently ignored.","example":"Closed","enum":["Closed","Cancelled"]},"transactionType":{"type":"string","description":"Transaction type. Case-sensitive. Only the four values below are recognized; any other value is silently ignored.","example":"Purchase","enum":["Purchase","Listing","Lease","Other"]},"price":{"type":"number","description":"Home price; mapped to Lofty's homePrice field.","example":1000000.0},"representing":{"type":"string","description":"Side the agent represented in the deal. Currently ignored by the handler.","example":"Buyer"},"acceptanceDate":{"type":"string","description":"Offer acceptance date. Currently ignored by the handler.","format":"date-time"},"expirationDate":{"type":"string","description":"Listing / contract expiration date. Mapped to Lofty's expiration field.","format":"date-time"},"closedAt":{"type":"string","description":"Actual close date. Mapped to Lofty's closeTime field.","format":"date-time"},"closingDate":{"type":"string","description":"Scheduled closing date. Mapped to Lofty's expectedCloseTime field (note: the Brokermint term \"closing date\" is interpreted as \"expected close\" on the Lofty side).","format":"date-time"}},"description":"Brokermint-sourced transaction payload."},"TransactionCallbackResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Business result code. 0 indicates success; non-zero values indicate a business failure (e.g. 200060 TRANSACTION_NOT_EXIST).","format":"int32","example":0},"message":{"type":"string","description":"Human-readable message that accompanies the code.","example":"success"}},"description":"Simple envelope response used by Brokermint webhook and property-address endpoints. Business failures surface as HTTP 200 with a non-zero code; integrators must inspect the code field."},"Contacts":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"contactType":{"type":"string"},"externalId":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"phone":{"type":"string"},"bmPrivate":{"type":"boolean"},"leadSource":{"type":"string"}},"description":"Brokermint-sourced contact payload."},"CommonResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Status code. 0 indicates success.","format":"int32","example":0},"message":{"type":"string","description":"Status message.","example":"success"}},"description":"Common response envelope with status code and message."},"AssignWorkingLeadsRequestV2":{"required":["leadIds"],"type":"object","properties":{"leadIds":{"type":"array","description":"Leads to assign, 1 to 100","example":[563172647619608,563172647619609],"items":{"type":"integer","description":"Leads to assign, 1 to 100","format":"int64"}},"salesAgent":{"type":"string","description":"Optional: which of the caller's Sales Agents works every lead. Omit to pick by lead ownership (a team lead goes to the team Sales Agent, a personal lead to the personal one). The whole request is refused when the caller has no such Sales Agent","example":"personal","enum":["personal","team"]}},"description":"Leads to hand to a Sales Agent"},"AssignWorkingLeadsResultV2":{"type":"object","properties":{"succeededLeads":{"type":"array","description":"Leads a Sales Agent now works, including leads that were already being worked; those stay with the Sales Agent working them even when salesAgent named another","items":{"$ref":"#/components/schemas/AssignWorkingLeadsResultV2.SucceededLead"}},"failedLeads":{"type":"array","description":"Leads that were not assigned, each with a reason code","items":{"$ref":"#/components/schemas/AssignWorkingLeadsResultV2.FailedLead"}},"remainingQuota":{"type":"array","description":"Capacity left on each Sales Agent the caller may use, after this request. Null when no lead could be assigned (every lead failed with NO_ACCESS) and the capacity could not be read","nullable":true,"items":{"$ref":"#/components/schemas/AssignWorkingLeadsResultV2.RemainingQuota"}}},"description":"Per-lead outcome of Assign, and the capacity left on the caller's Sales Agents"},"AssignWorkingLeadsResultV2.FailedLead":{"type":"object","properties":{"leadId":{"type":"integer","description":"Lead ID","format":"int64","example":563172647619609},"reason":{"type":"string","description":"Reason code","example":"QUOTA_EXCEEDED","enum":["QUOTA_EXCEEDED","NO_SEAT","SALES_AGENT_NOT_AVAILABLE","LEAD_NOT_FOUND","NO_ACCESS","DO_NOT_CONTACT","SAME_PHONE_LEAD_FOLLOWING","INTERNAL_ERROR"]},"message":{"type":"string","description":"Readable explanation of the reason"}},"description":"Leads that were not assigned, each with a reason code"},"AssignWorkingLeadsResultV2.RemainingQuota":{"type":"object","properties":{"salesAgentType":{"type":"string","description":"personal or team","enum":["personal","team","other"]},"ownerUserId":{"type":"integer","description":"User ID of the Sales Agent's owner","format":"int64"},"ownerName":{"type":"string","description":"Full name of the Sales Agent's owner"},"assistantName":{"type":"string","description":"Name of the AI"},"remainingQuota":{"type":"integer","description":"Leads it can still take on; null when it could not be read","format":"int64","nullable":true}},"description":"Capacity left on each Sales Agent the caller may use, after this request. Null when no lead could be assigned (every lead failed with NO_ACCESS) and the capacity could not be read","nullable":true},"AssignWorkingLeadsResultV2.SucceededLead":{"type":"object","properties":{"leadId":{"type":"integer","description":"Lead ID","format":"int64","example":563172647619608},"alreadyWorking":{"type":"boolean","description":"True when a Sales Agent was already working the lead: nothing changed and no capacity was used. False when this request handed it over","example":false},"salesAgentType":{"type":"string","description":"The Sales Agent actually working the lead, which for an already worked lead can differ from the requested salesAgent: personal / team, or other for a Sales Agent the caller cannot use; null when it could not be read","nullable":true,"enum":["personal","team","other"]},"ownerUserId":{"type":"integer","description":"User ID of that Sales Agent's owner","format":"int64","nullable":true},"ownerName":{"type":"string","description":"Full name of that Sales Agent's owner","nullable":true},"assistantName":{"type":"string","description":"Name of that AI","nullable":true}},"description":"Leads a Sales Agent now works, including leads that were already being worked; those stay with the Sales Agent working them even when salesAgent named another"},"WebsiteFeatureAreaCreateRequest":{"required":["city","type"],"type":"object","properties":{"type":{"type":"integer","description":"Area type: 0 = City, 1 = Subdivision, 2 = Community, 4 = Neighborhood, 5 = SubArea. Every type except City needs `neighborhood`.","format":"int32","example":4,"enum":[0,1,2,4,5]},"city":{"type":"string","description":"City name.","example":"Irvine"},"state":{"type":"string","description":"State or province code. May be empty where there is none.","example":"CA"},"neighborhood":{"type":"string","description":"Neighborhood / subdivision / community name. Required unless type is 0 (City).","example":"Woodbury"},"displayName":{"type":"string","description":"Optional name shown on the website instead of the neighborhood name."}},"description":"A neighborhood or city to add as a Feature Area (community page) on the caller's website."},"TaskRequestV2":{"required":["type"],"type":"object","properties":{"content":{"type":"string","description":"Description of the task","example":"Send an email to my lead"},"leadId":{"type":"integer","description":"The ID of the lead this task is related to","format":"int64","example":563172647619608},"type":{"type":"string","description":"The type of the task. Could be `Other`, `Call`, `Email`, `Text`, `Appointment`","example":"Call"},"assignedRole":{"type":"string","description":"Role the task should be assigned to (Agent or Assistant)","example":"Agent"},"startAt":{"type":"string","description":"When this task/appointment should start. ISO8601 format in specified timezone, e.g., '2026-03-01T15:00:00-08:00'","example":"2026-03-01T15:00:00-08:00"},"endAt":{"type":"string","description":"When this task/appointment should end. ISO8601 format in specified timezone, e.g., '2026-03-01T16:00:00-08:00'. For regular tasks, this represents the deadline","example":"2026-03-01T16:00:00-08:00"},"timeZoneCode":{"type":"string","description":"Timezone code for this task/appointment","example":"America/Los_Angeles"},"address":{"type":"string","description":"Address/location for appointment type tasks","example":"123 Main St, Los Angeles, CA"},"assignedRoleId":{"type":"integer","description":"Lead role the task is assigned to, custom roles included. Takes priority over assignedRole. Must be a role somebody holds on this lead, the same list the Assign To dropdown shows; 400 otherwise. Omit it to keep using assignedRole.","format":"int32","example":10},"ownerUserId":{"type":"integer","description":"Lofty user ID owning the appointment. Must be a member of the caller's team. Omit it and the caller owns the appointment, as before. Ignored for plain tasks.","format":"int64","example":844775556213479},"participants":{"$ref":"#/components/schemas/ParticipantsRequestV2"}},"description":"Task or appointment payload."},"TaskV2IdResponse":{"type":"object","properties":{"taskId":{"type":"integer","description":"ID of the newly created task or appointment.","format":"int64","example":563172647619608}},"description":"Wrapped response for POST /v2.0/tasks. The new task's ID is returned under the 'taskId' key."},"ShowingCreateRequestV2":{"required":["endAt","leadId","listing","startAt"],"type":"object","properties":{"leadId":{"type":"integer","description":"Lead the showing is for. The caller must manage this lead.","format":"int64","example":563172647619608},"listing":{"$ref":"#/components/schemas/ShowingListingRef"},"startAt":{"type":"string","description":"Showing start, ISO 8601 with offset.","example":"2026-11-01T10:00:00-07:00"},"endAt":{"type":"string","description":"Showing end, ISO 8601 with offset. Must be after startAt.","example":"2026-11-01T10:30:00-07:00"},"status":{"type":"string","description":"Initial status. Defaults to scheduled. completed allows a past time range.","example":"scheduled","enum":["requested","scheduled","in_progress","completed","denied","expired","cancelled"]},"note":{"type":"string","description":"Free-text note shown with the showing.","example":"Buyer prefers morning"},"externalId":{"type":"string","description":"The partner's own id for this showing. Used as the idempotency key.","example":"showami-98765"},"timeZone":{"type":"string","description":"IANA timezone of the listing's location, used when the listing has no showing settings yet. Optional.","example":"America/Los_Angeles"}},"description":"Showing to create."},"ShowingListingRef":{"type":"object","properties":{"listingId":{"type":"string","description":"Lofty listing id.","example":"123456789"},"mlsOrgId":{"type":"integer","description":"MLS organisation id, paired with mlsListingId. Only the MLS of the agent's primary site is matched; a number from another MLS returns 200132, so pass listingId or address instead.","format":"int64","example":12},"mlsListingId":{"type":"string","description":"MLS listing number, paired with mlsOrgId.","example":"ML81234567"},"address":{"type":"string","description":"Full street address. Used as the fallback when no Lofty listing matches.","example":"123 Main St, San Jose, CA 95112"}},"description":"Which property the showing is for. Provide exactly one of: listingId; mlsOrgId + mlsListingId; address. Resolution order is listingId, then the MLS number, then address. When neither listingId nor the MLS number matches a Lofty listing, address is required and the showing is recorded against an external property."},"ShowingCreateResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ShowingCreateResultV2"}},"description":"Wrapped response for POST /v2.0/showings. The result is returned under the 'data' key."},"ShowingCreateResultV2":{"type":"object","properties":{"id":{"type":"string","description":"Showing id. Use it with the per-showing endpoints.","example":"987654321"},"created":{"type":"boolean","description":"False when an existing showing with the same externalId was returned instead of creating a new one."}},"description":"Result of creating a showing."},"JsonNode":{"type":"object","description":"Structured feedback exactly as submitted."},"ShowingFeedbackRequestV2":{"type":"object","properties":{"authorType":{"type":"string","description":"Who gave the feedback. Defaults to partner.","example":"buyer_agent","enum":["buyer_agent","lead","listing_agent","partner"]},"authorName":{"type":"string","description":"Display name of the author. Do not send an email address or phone number.","example":"Jane Doe"},"content":{"type":"string","description":"Feedback text.","example":"Buyers loved the kitchen, concerned about street noise."},"payload":{"$ref":"#/components/schemas/JsonNode"},"externalId":{"type":"string","description":"The partner's own id for this feedback. Used as the idempotency key.","example":"showami-fb-123"}},"description":"Feedback to append."},"ShowingFeedbackItemResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ShowingFeedbackV2"}},"description":"Wrapped response for POST /v2.0/showings/{id}/feedback. The result is returned under the 'data' key."},"ShowingFeedbackV2":{"type":"object","properties":{"id":{"type":"string","example":"555"},"showingId":{"type":"string","example":"987654321"},"authorType":{"type":"string","description":"buyer_agent, lead, listing_agent or partner.","example":"buyer_agent"},"authorName":{"type":"string"},"content":{"type":"string"},"payload":{"$ref":"#/components/schemas/JsonNode"},"source":{"type":"string","description":"Partner (vendor) id that submitted the feedback."},"externalId":{"type":"string"},"createdAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-01T18:00:00Z"}},"description":"Feedback left on a showing."},"ShowingItemResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ShowingV2"}},"description":"Wrapped response for GET /v2.0/showings/{id}, PATCH /v2.0/showings/{id} and POST /v2.0/showings/{id}/cancel. The result is returned under the 'data' key."},"ShowingListingV2":{"type":"object","properties":{"listingId":{"type":"string","description":"Lofty listing id, or the external property record id when external is true.","example":"123456789"},"external":{"type":"boolean","description":"True when the showing is recorded against an external property."},"address":{"type":"string","example":"123 Main St, San Jose, CA 95112"},"streetAddress":{"type":"string","example":"123 Main St"},"mlsOrgId":{"type":"string","example":"12"},"price":{"type":"integer","format":"int64","example":1250000},"beds":{"type":"integer","format":"int32","example":3},"baths":{"type":"number","format":"float","example":2.5},"sqft":{"type":"integer","format":"int32","example":1800},"listingUrl":{"type":"string","description":"Listing detail page on the agent's website."},"picture":{"type":"string","description":"First listing photo."},"sold":{"type":"boolean","description":"True when the listing has since sold."}},"description":"The property the showing is for. External properties (no matching Lofty listing) carry only the address."},"ShowingPersonV2":{"type":"object","properties":{"id":{"type":"string","description":"Lofty user id (agents) or lead id (the lead).","example":"123456"},"firstName":{"type":"string","example":"Jane"},"lastName":{"type":"string","example":"Doe"}},"description":"A person attached to the showing."},"ShowingV2":{"type":"object","properties":{"id":{"type":"string","example":"987654321"},"leadId":{"type":"string","example":"563172647619608"},"type":{"type":"string","description":"showing: a showing appointment, the kind this API creates and maintains. showing_request: a request the lead raised on the agent's website, listed read-only with status requested; its id belongs to a different space and cannot be used with the per-showing endpoints.","example":"showing","enum":["showing","showing_request"]},"status":{"type":"string","description":"Status: requested, scheduled, in_progress, completed, denied, expired, cancelled.","example":"scheduled"},"startAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-01T17:00:00Z"},"endAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-01T17:30:00Z"},"note":{"type":"string","description":"Free-text note."},"source":{"type":"string","description":"Partner (vendor) id that created the showing; null for showings created inside Lofty.","example":"20001"},"externalId":{"type":"string","description":"The partner's own id for the showing; null for showings created inside Lofty."},"privateLead":{"type":"boolean","description":"True when the lead is private to the buyer agent."},"listing":{"$ref":"#/components/schemas/ShowingListingV2"},"buyerAgent":{"$ref":"#/components/schemas/ShowingPersonV2"},"listingAgent":{"$ref":"#/components/schemas/ShowingPersonV2"},"lead":{"$ref":"#/components/schemas/ShowingPersonV2"}},"description":"A showing."},"SendTaskReminderPushRequest":{"required":["taskId","type"],"type":"object","properties":{"taskId":{"type":"integer","description":"Task ID or Appointment ID","format":"int64","example":123456},"type":{"type":"string","description":"Task type. APPOINTMENT or TASK.","example":"TASK","enum":["TASK","APPOINTMENT"]}},"description":"Send task reminder app push notification request"},"SendSmsToAgentRequest":{"required":["content"],"type":"object","properties":{"content":{"type":"string","description":"SMS content to send to the agent's phone number","example":"You have a new lead assigned."},"agentId":{"type":"integer","description":"User ID of the teammate to notify. Must belong to the caller's own team. Defaults to the caller's own user ID when omitted (CHIME-70593).","format":"int64","example":563172647619608}},"description":"Send system SMS to agent request"},"SendEmailToAgentRequest":{"required":["content","subject"],"type":"object","properties":{"subject":{"type":"string","description":"Email subject","example":"You have a new lead assigned."},"content":{"type":"string","description":"Email body content (HTML supported)","example":"<p>Hello, you have a new lead.</p>"},"agentId":{"type":"integer","description":"User ID of the teammate to notify. Must belong to the caller's own team. Defaults to the caller's own user ID when omitted (CHIME-70593).","format":"int64","example":563172647619608}},"description":"Send system email to agent request"},"CalendarRequestV2":{"required":["content","leadId","timeZoneCode","type"],"type":"object","properties":{"type":{"type":"string","description":"Calendar type: TASK or APPOINTMENT","example":"TASK"},"content":{"type":"string","description":"Content/Description of the calendar event","example":"Follow up with client about property"},"leadId":{"type":"integer","description":"Lead ID associated with this calendar event","format":"int64","example":563172647619608},"startAt":{"type":"string","description":"Start time in ISO8601 format with timezone. Preferred over startAtMs when both are provided.","example":"2026-03-01T14:00:00-08:00"},"endAt":{"type":"string","description":"End time in ISO8601 format. Preferred over endAtMs when both are provided.","example":"2026-03-01T15:00:00-08:00"},"startAtMs":{"type":"integer","description":"Start time as Unix timestamp in milliseconds. Used when startAt is not provided.","format":"int64","example":1740866400000},"endAtMs":{"type":"integer","description":"End time as Unix timestamp in milliseconds. Used when endAt is not provided.","format":"int64","example":1740870000000},"timeZoneCode":{"type":"string","description":"Timezone code","example":"America/Los_Angeles"},"taskWay":{"type":"string","description":"Task way type: Call, Email, Text, Other (only for TASK)","example":"Call"},"assignedRole":{"type":"string","description":"Assigned role: Agent or Assistant (only for TASK)","example":"Agent"},"address":{"type":"string","description":"Location/Address (only for APPOINTMENT)","example":"123 Main St, Los Angeles, CA"},"assignedRoleId":{"type":"integer","description":"Lead role the task is assigned to, custom roles included. Takes priority over assignedRole. Must be a role somebody holds on this lead, the same list the Assign To dropdown shows; 400 otherwise. Omit it to keep using assignedRole.","format":"int32","example":10},"ownerUserId":{"type":"integer","description":"Lofty user ID owning the appointment. Must be a member of the caller's team. Omit it and the caller owns the appointment, as before. Ignored for plain tasks.","format":"int64","example":844775556213479},"participants":{"$ref":"#/components/schemas/ParticipantsRequestV2"}},"description":"Calendar payload. type decides whether a Task or Appointment is created."},"CalendarCreateResult":{"type":"object","properties":{"id":{"type":"string","description":"Calendar ID with type suffix","example":"12345-task"},"type":{"type":"string","description":"Calendar type","example":"TASK"},"message":{"type":"string","description":"Success message"}},"description":"Calendar creation result"},"CreateCalendarResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CalendarCreateResult"}},"description":"Calendar creation response envelope"},"GeneratePrepareInsightRequest":{"required":["appointmentId","leadId"],"type":"object","properties":{"leadId":{"type":"integer","description":"Lead ID","format":"int64","example":100001},"appointmentId":{"type":"integer","description":"Appointment ID","format":"int64","example":200001}},"description":"Generate prepare insight request"},"ApiCommonResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Response code, 0 means success","format":"int32","example":0},"message":{"type":"string","description":"Response message","example":"success"},"data":{"type":"object","description":"Response data payload"}},"description":"Common API response wrapper"},"CreateLeadAnalysisRequest":{"required":["leadIds"],"type":"object","properties":{"leadIds":{"type":"array","description":"Lead IDs to analyze (required, cannot be empty)","example":[100001,100002],"items":{"type":"integer","description":"Lead IDs to analyze (required, cannot be empty)","format":"int64"}}},"description":"Create LeadAnalysis task request"},"GenerateCallSummaryRequest":{"required":["callRecordId","leadId"],"type":"object","properties":{"callRecordId":{"type":"integer","description":"Call record ID","format":"int64","example":123456},"leadId":{"type":"integer","description":"Lead ID","format":"int64","example":100001}},"description":"Generate call summary request"},"GenerateCallScriptRequest":{"required":["leadId","taskId"],"type":"object","properties":{"leadId":{"type":"integer","description":"Lead ID","format":"int64","example":100001},"taskId":{"type":"integer","description":"Task ID","format":"int64","example":300001}},"description":"Generate call script request"},"CallScriptResponse":{"type":"object","properties":{"context":{"type":"string","description":"Call background context overview"},"objectiveSuggestion":{"type":"array","description":"Suggested call objectives","items":{"type":"string","description":"Suggested call objectives"}},"keyTalkingPoints":{"type":"array","description":"Key talking points","items":{"$ref":"#/components/schemas/KeyTalkingPoint"}}},"description":"Generated call script"},"KeyTalkingPoint":{"type":"object","properties":{"title":{"type":"string","description":"Talking point title"},"value":{"type":"array","description":"Talking point content items","items":{"type":"string","description":"Talking point content items"}}},"description":"A key talking point with title and content"},"WebhookAuthHeader":{"required":["name","value"],"type":"object","properties":{"name":{"type":"string","description":"Header name, for example `Authorization` or `X-Api-Key`. Letters, digits and hyphens, up to 64 characters. Cannot be `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding` or similar transport headers, or start with `webhook-` or `Lofty-`.","example":"Authorization"},"value":{"type":"string","description":"Header value, printable ASCII, up to 512 characters. Write-only: it is never returned by the API.","example":"Bearer partner-gateway-token"}},"description":"Optional. A header Lofty adds to every delivery of this subscription, for receivers behind an API gateway that only accepts a fixed credential. It is in addition to the signature headers, not a replacement for them. Write-only: stored encrypted, never returned.","nullable":true},"WebhookRequest":{"required":["callbackUrl","listId"],"type":"object","properties":{"listId":{"type":"integer","description":"Event type to subscribe to. See [Event types](/concepts/webhooks#event-types) for what each value means.","format":"int32","example":2,"enum":[1,2,3,4,5,6,7,8,9,10,11,12,13]},"callbackUrl":{"type":"string","description":"Callback URL that receives event payloads. Must be a publicly reachable http or https URL; use HTTPS.","example":"https://example.com/webhooks/lofty"},"limit":{"maximum":5000,"minimum":1,"type":"integer","description":"Maximum number of events to include in a single callback batch. Default 100, maximum 5000.","format":"int32","example":100,"default":100},"permissionMode":{"type":"integer","description":"Recipient resolution mode. `0` = assignment-based (default): callbacks fire for leads assigned to the subscribing user, or for company owners/admins. `1` = ownership-based: callbacks also fire for any lead the subscribing user manages by ownership (their team / office / personally owned), regardless of direct assignment.","format":"int32","example":0,"default":0,"enum":[0,1]},"authHeader":{"$ref":"#/components/schemas/WebhookAuthHeader"}},"description":"Webhook subscription payload."},"WebhookResponse":{"required":["callbackUrl","listId","subscribeId","teamId"],"type":"object","properties":{"subscribeId":{"type":"integer","description":"the subscribe id","format":"int64","example":1234},"teamId":{"type":"integer","description":"The ID of the team to get","format":"int64","example":13233324},"listId":{"type":"integer","description":"Event type of the subscription. See [Event types](/concepts/webhooks#event-types) for what each value means.","format":"int32","example":1},"vendorId":{"type":"integer","description":"The ID of the vendor","format":"int64","example":123},"callbackUrl":{"type":"string","description":"The url link that you receive information","example":"http://xxx.test.com"},"limit":{"type":"integer","description":"limitation of webhook notifications in 30 mins for each, max is 5000","format":"int32","example":100},"permissionMode":{"type":"integer","description":"Recipient resolution mode. 0 = assignment-based (default); 1 = ownership-based (also delivers leads the subscriber manages by team/office/personal ownership).","format":"int32","example":0},"secret":{"type":"string","description":"Signing secret (`whsec_...`) used to verify that deliveries come from Lofty. Returned only when the subscription is created; it is never returned again. To get a new one, call the rotate endpoint.","nullable":true,"example":"whsec_bG9mdHktc2FtcGxlLXNpZ25pbmctc2VjcmV0LTAwMDE="},"warnings":{"type":"array","description":"Non-blocking remarks about the subscription that was just created, for example when the callbackUrl carries a query string. Present only on the create response, and only when there is something to report. The subscription is created either way.","nullable":true,"items":{"$ref":"#/components/schemas/WebhookWarning"}}}},"WebhookWarning":{"type":"object","properties":{"code":{"type":"string","description":"Stable code for programs to react to.","example":"CALLBACK_URL_HAS_QUERY"},"message":{"type":"string","description":"Human readable explanation.","example":"The callbackUrl carries a query string. Do not put a secret or token in the URL."}},"description":"Non-blocking remarks about the subscription that was just created, for example when the callbackUrl carries a query string. Present only on the create response, and only when there is something to report. The subscription is created either way.","nullable":true},"WebhookSecretResponse":{"type":"object","properties":{"subscribeId":{"type":"integer","description":"The subscription the secret belongs to.","format":"int64","example":1234},"secret":{"type":"string","description":"The new signing secret (`whsec_...`). Shown only in the rotate response; store it right away.","example":"whsec_bG9mdHktc2FtcGxlLXNpZ25pbmctc2VjcmV0LTAwMDE="},"previousSecretExpiresAt":{"type":"string","description":"Until when the previous secret keeps signing deliveries (ISO 8601, UTC): 7 days after the rotation. Absent when there was no previous secret. During the overlap each delivery carries a signature for both secrets, so receivers can switch without downtime.","nullable":true,"example":"2026-11-30T08:00:00Z"}}},"TransactionCustomFieldRequest":{"required":["attributeName","attributeType"],"type":"object","properties":{"attributeName":{"type":"string","description":"Display name for the new field. Trimmed before use, and checked for collisions against both existing custom fields and the built-in transaction fields.","example":"Mailer Sent"},"attributeType":{"type":"string","description":"Field data type.\n\nNote two differences from the lead custom field API: `anniversary_date` does not exist on transactions and is rejected, and `html` is not offered here.","example":"date","enum":["text","number","date","percentage","currency","single_select","multi_select"]},"params":{"type":"string","description":"Option list, required for `single_select` and `multi_select` and ignored otherwise.\n\nBoth shapes are accepted and normalised: a bare JSON array `[\"Pending\",\"Closed\"]`, or the lead API's wrapper `{\"option\":[\"Pending\",\"Closed\"]}`. Sending an empty list for a select type is rejected.","example":"[\"Pending\",\"Closed\"]"},"formIds":{"type":"array","description":"Field groups to place the new field in, from `GET /v1.0/transaction/forms`.\n\n**A field in no group is invisible** - it will not appear on the transaction detail page, as a list column, or in filters. Omit this only if you intend to place the field from the CRM UI afterwards.\n\nEvery id is validated before the field is created, so a bad id fails the whole request rather than leaving an orphaned field behind. A group already at its 50-field limit is rejected the same way.","example":[301],"items":{"type":"integer","description":"Field groups to place the new field in, from `GET /v1.0/transaction/forms`.\n\n**A field in no group is invisible** - it will not appear on the transaction detail page, as a list column, or in filters. Omit this only if you intend to place the field from the CRM UI afterwards.\n\nEvery id is validated before the field is created, so a bad id fails the whole request rather than leaving an orphaned field behind. A group already at its 50-field limit is rejected the same way.","format":"int64"}}},"description":"Custom field definition."},"CustomFieldResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Custom field id.","format":"int64","example":1001},"name":{"type":"string","description":"Custom field display name.","example":"Closing Agent"},"type":{"type":"string","description":"Custom field data type. Note the mixed casing: Single-Select and Multi-Select are emitted with hyphens and mixed case, while the other values are the upper-case enum names.","example":"Single-Select","enum":["DATE","TEXT","NUMBER","PERCENTAGE","Single-Select","Multi-Select","CURRENCY","HTML"]},"params":{"type":"string","description":"For Single-Select and Multi-Select types, a JSON string encoding the option list, e.g. \"[{\\\"label\\\":\\\"Option A\\\",\\\"value\\\":\\\"1\\\"},{\\\"label\\\":\\\"Option B\\\",\\\"value\\\":\\\"2\\\"}]\". Empty or null for non-select types.","example":"[{\"label\":\"Option A\",\"value\":\"1\"},{\"label\":\"Option B\",\"value\":\"2\"}]"}}},"TaskIdResponse":{"type":"object","properties":{"taskId":{"type":"integer","description":"ID of the newly created task.","format":"int64","example":563172647619608}},"description":"Wrapped response for POST /v1.0/tasks. The new task's ID is returned under the 'taskId' key."},"CompanyRequest":{"type":"object","properties":{"name":{"type":"string","description":"Company name.","example":"Lofty Realty Group"},"phone":{"type":"string","description":"Primary phone number, digits only.","example":"4155551234"},"phoneCode":{"type":"string","description":"Phone country calling code without the leading +.","example":"1"},"phoneCountry":{"type":"string","description":"ISO 3166-1 alpha-2 country code for the phone.","example":"US"},"email":{"type":"string","description":"Primary contact email.","example":"ops@lofty.com"},"city":{"type":"string","description":"City.","example":"San Francisco"},"state":{"type":"string","description":"State or province.","example":"CA"},"zipcode":{"type":"string","description":"Postal / ZIP code.","example":"94103"},"streetAddress":{"type":"string","description":"Street address line.","example":"123 Market St, Suite 200"},"header":{"type":"string","description":"Header / display banner image URL.","example":"https://cdn.chime.me/image/fs/team/header.png"}},"description":"Company payload."},"NoteIdResponse":{"type":"object","properties":{"noteId":{"type":"integer","description":"ID of the newly created note.","format":"int64","example":563172647619608}},"description":"Wrapped response for POST /v1.0/notes. The new note's ID is returned under the 'noteId' key."},"SmsRequest":{"required":["content","leadId"],"type":"object","properties":{"phoneNumber":{"type":"string","description":"Recipient phone number","example":"5865865860"},"phoneCode":{"type":"string","description":"Recipient phone code","example":"1"},"content":{"type":"string","description":"SMS content","example":"Hello, this is a test message"},"leadId":{"type":"integer","description":"Lead ID. When phoneNumber and phoneCode are not provided or no matching phone is found for the lead, the system will use the primary phone number of this lead.","format":"int64","example":563172647619608}},"description":"SMS request payload."},"SmsResponse":{"type":"object","properties":{"messageId":{"type":"string","description":"The ID of the SMS message"},"phoneNumber":{"type":"string","description":"Recipient phone number"},"phoneCode":{"type":"string","description":"Recipient phone code"}}},"EmailSendRequest":{"required":["content","leadId","subject"],"type":"object","properties":{"subject":{"type":"string","description":"Email subject","example":"Welcome to our service"},"content":{"type":"string","description":"Email content","example":"Hello, this is a test email"},"leadId":{"type":"integer","description":"Lead ID. When toEmail is not provided or no matching email is found for the lead, the system will use the primary email address of this lead. At least one of toEmail or leadId must be provided.","format":"int64","example":563172647619608},"toEmail":{"type":"string","description":"Recipient email address.","example":"recipient@example.com"}},"description":"Email send request payload."},"EmailSendResponse":{"type":"object","properties":{"messageId":{"type":"string","description":"The ID of the email message"},"toEmail":{"type":"string","description":"Recipient email address"},"subject":{"type":"string","description":"Email subject"}}},"CreateMassActionRequest":{"required":["leadIds","params","type"],"type":"object","properties":{"type":{"type":"string","description":"Which bulk operation to run.","enum":["sms","email","tag","pipeline"]},"leadIds":{"type":"array","description":"The leads to target. Up to 5000 per call.","items":{"type":"integer","description":"The leads to target. Up to 5000 per call.","format":"int64"}},"params":{"type":"object","additionalProperties":{"type":"object","description":"Action-specific payload.\n\n- `sms`: `content` (required) - the text message body.\n- `email`: `subject` and `content` (both required).\n- `tag`: `tagsAdd` and/or `tagsRemove` (string arrays; at least one non-empty).\n- `pipeline`: `stage` (required) - the target pipeline stage name."},"description":"Action-specific payload.\n\n- `sms`: `content` (required) - the text message body.\n- `email`: `subject` and `content` (both required).\n- `tag`: `tagsAdd` and/or `tagsRemove` (string arrays; at least one non-empty).\n- `pipeline`: `stage` (required) - the target pipeline stage name."}},"description":"Mass action request."},"MassActionResponse":{"type":"object","properties":{"planId":{"type":"integer","description":"The plan id.","format":"int64","example":83920145},"type":{"type":"string","description":"Which bulk operation this plan runs.","example":"sms"},"name":{"type":"string","description":"Plan name, assigned by the mass-action service."}},"description":"The created mass-action plan. Processing is asynchronous: this response confirms the plan was accepted, not that any send/update has happened yet."},"LogTypeRequest":{"required":["content","leadId","logType"],"type":"object","properties":{"leadId":{"type":"integer","description":"ID of the lead to attach this log to. Must be accessible to the caller.","format":"int64","example":563172647619608},"logType":{"type":"string","description":"Channel of the manual log entry.","example":"logCall","enum":["logCall","logEmail","logText"]},"leadPhoneNumber":{"maxLength":20,"type":"string","description":"Phone number that was called. Required when logType = logCall. Max 20 characters.","example":"5865865860"},"callingOutcome":{"maxLength":20,"type":"string","description":"Outcome of the call. Only meaningful when logType = logCall. Max 20 characters.","example":"VoiceMessage","enum":["Talked","VoiceMessage","NoAnswer","BadNumber","DNCNumber","DNCContact"]},"content":{"maxLength":5000,"type":"string","description":"Free-text body of the log entry: call notes, email body, or SMS content. Silently truncated to 5000 characters.","example":"Discussed Austin inventory, will send pre-approval doc tomorrow."},"outboundOrInbound":{"type":"string","description":"Direction of the communication from the agent's point of view. 'outbound' = agent -> lead; 'inbound' = lead -> agent. Defaults to 'outbound' when omitted.","example":"outbound","default":"outbound","enum":["outbound","inbound"]},"isPin":{"type":"boolean","description":"Whether to pin this entry to the top of the lead's timeline.","example":false,"default":false},"emailSubject":{"type":"string","description":"Email subject. Only meaningful when logType = logEmail; ignored otherwise.","example":"Follow-up on Austin listings"},"toEmail":{"type":"string","description":"Recipient email address. Only meaningful when logType = logEmail; ignored otherwise.","example":"sarah.johnson@example.com"},"fromEmail":{"type":"string","description":"Sender email address. Only meaningful when logType = logEmail; ignored otherwise.","example":"agent@lofty.com"}},"description":"Manual log entry payload."},"LogTypeResponse":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the manual log entry.","format":"int64","example":563172647619608},"leadId":{"type":"integer","description":"ID of the lead this entry belongs to.","format":"int64","example":100001},"leadPhoneNumber":{"type":"string","description":"Phone number associated with the call. Only populated for logCall entries.","example":"5865865860"},"callingOutcome":{"type":"string","description":"Outcome of the call. Only populated for logCall entries.","example":"VoiceMessage","enum":["Talked","VoiceMessage","NoAnswer","BadNumber","DNCNumber","DNCContact"]},"content":{"type":"string","description":"Body of the log entry: call notes, email body, or SMS content.","example":"Discussed Austin inventory, will send pre-approval doc tomorrow."},"createTime":{"type":"string","description":"Time the entry was logged, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","example":"2026-04-22 10:15:30"},"outboundOrInbound":{"type":"string","description":"Direction of the communication from the agent's point of view. 'outbound' = agent -> lead; 'inbound' = lead -> agent.","example":"outbound","enum":["outbound","inbound"]},"isPin":{"type":"boolean","description":"Whether this entry is pinned to the top of the lead's timeline.","example":false},"agentId":{"type":"integer","description":"User ID of the agent who created the entry.","format":"int64","example":100234},"emailSubject":{"type":"string","description":"Email subject. Only populated for logEmail entries.","example":"Follow-up on Austin listings"},"toEmail":{"type":"string","description":"Recipient email address. Only populated for logEmail entries.","example":"sarah.johnson@example.com"},"fromEmail":{"type":"string","description":"Sender email address. Only populated for logEmail entries.","example":"agent@lofty.com"}},"description":"Manual log entry."},"LogTypeSingleResponse":{"type":"object","properties":{"logType":{"$ref":"#/components/schemas/LogTypeResponse"}},"description":"Wrapped response for GET /v1.0/logType/{id} and POST /v1.0/logType. The manual log entry is returned under the 'logType' key."},"LeadRequest":{"required":["firstName"],"type":"object","properties":{"cannotText":{"type":"boolean","description":"false: can send message to the lead"},"cannotCall":{"type":"boolean","description":"false: can call to the lead"},"cannotEmail":{"type":"boolean","description":"false: can email to the lead"},"firstName":{"type":"string","description":"The first/given name of the lead \nCaution: Max limit 30 characters. If you exceed the limit, the import will succuss, but only import 30 characters in front.","example":"Bob"},"lastName":{"type":"string","description":"The last/family name of the lead \nCaution: Max limit 30 characters. If you exceed the limit, the import will succuss, but only import 30 characters in front.","example":"Li"},"emails":{"type":"array","description":"A list of email addresses associated with the lead","example":["jane.doe@example.com","jdoe-work@company.com"],"items":{"type":"string","example":"jane.doe@example.com"}},"phones":{"type":"array","description":"A list of phone numbers associated with the lead. (No more than 20 characters per phone)","example":["+14155551234","+12125559876"],"items":{"type":"string","example":"+14155551234"}},"leadTypes":{"type":"array","description":"Types of lead, expressed by ID. Type ID : Other (-1), Seller (1), Buyer (2), Renter (5), Investor (6), Agent (7), Homeowner (8), Landlord (9)","example":[2,5],"items":{"type":"integer","format":"int32","example":2}},"assignedUserId":{"type":"integer","description":"ID of the agent to directly assign this lead to. When provided, automatic lead routing is skipped. When omitted or empty, the lead is routed automatically based on routing rules.","format":"int64","example":10000000514},"pondId":{"type":"integer","description":"ID of the lead pond to put this lead into, as returned by `GET /v1.0/team-features/lead-ponds`. When provided, automatic lead routing is skipped and the lead has no agent assignee. Cannot be combined with `assignedUserId` or `assignGroupId`.","format":"int64","example":12345},"streetAddress":{"type":"string","description":"The streetAddress associated with the lead. Deprecated: please use the streetAddress field in property instead.","example":"The White House,1600 Pennsylvania Avenue NW","deprecated":true},"city":{"type":"string","description":"The city associated with the lead. Deprecated: please use the city field in property instead.","example":"Washington DC","deprecated":true},"state":{"type":"string","description":"The state associated with the lead. Deprecated: please use the state field in property instead.","example":"Washington DC","deprecated":true},"zipCode":{"type":"string","description":"ZipCode. Deprecated: please use the zipCode field in property instead.","example":"20500","deprecated":true},"referredBy":{"type":"string","description":"The referee of the lead","example":"Jeremy Kelly"},"stage":{"type":"string","description":"The stage the lead is in, less than 20 characters","example":"Pending"},"groups":{"type":"array","description":"The groups the lead is in. Caution: Max limit 30 characters. If you exceed the limit, the import will succeed, but only import 30 characters in front. Deprecated, use segments instead.","example":["VIP Clients","Open House Feb"],"deprecated":true,"items":{"type":"string","example":"VIP Clients"}},"segments":{"type":"array","description":"The segments the lead is in. Caution: Max limit 30 characters. If you exceed the limit, the import will succeed, but only import 30 characters in front.","example":["First-Time Buyers","Downtown Area"],"items":{"type":"string","example":"First-Time Buyers"}},"tags":{"type":"array","description":"The tags associated with the lead. All existing tags will be updated based on this call. Caution: Max limit 64 characters. If you exceed the limit, the import will succeed, but only import 64 characters in front.","example":["Hot Lead","Zillow"],"items":{"type":"string","example":"Hot Lead"}},"tagsAdd":{"type":"array","description":"The tags associated with the lead. All existing tags will be retained, only add new tags based on this call. Caution: Max limit 64 characters. If you exceed the limit, the import will succeed, but only import 64 characters in front.","example":["Referral","Pre-Approved"],"items":{"type":"string","example":"Referral"}},"source":{"type":"string","description":"The source of the lead","example":"Open House"},"inquiry":{"$ref":"#/components/schemas/LeadInquiry"},"property":{"$ref":"#/components/schemas/LeadProperty"},"unsubscription":{"type":"boolean","description":"Unsubscription the email"},"welcomeEmail":{"type":"boolean","description":"send Welcome Email. (Not supporting update)"},"leadAlert":{"type":"boolean","description":"send new lead alert email. (Not supporting update)"},"customAttributeList":{"type":"array","description":"User customized field","items":{"$ref":"#/components/schemas/CustomAttribute"}},"birthday":{"type":"string","description":"The birthday of the lead(pattern:MMM d, yyyy)","example":"Jun 5, 2001"},"leadRouting":{"type":"boolean","description":"Deprecated. Lead routing is now automatically applied when `assignedUserId` is not provided. This field has no effect.","deprecated":true},"assignGroupId":{"type":"integer","description":"Specifies which routing rule scope to apply when automatic lead routing is triggered (i.e., `assignedUserId` is not provided). Set to `-1` to use company-level routing rules. Set to a specific office ID to use that office's routing rules. If omitted, default routing rules will be applied according to the lead’s ownership scope.","format":"int64"},"buyingTimeFrame":{"type":"string","description":"buying time frame, `1-3`, `3-6`, `6-12`, `12+`, `Just Looking`, `Refinancing`.","example":"6-12"},"preQual":{"type":"string","description":"Pre-qual, `Yes` or `No`.","example":"Yes"},"houseToSell":{"type":"string","description":"House to Sell, `Yes` or `No`.","example":"Yes"},"fthb":{"type":"string","description":"first time home buyer, `Yes` or `No`.","example":"Yes"},"withBuyerAgent":{"type":"string","description":"With buyer Agent, `Yes` or `No`.","example":"Yes"},"sellingTimeFrame":{"type":"string","description":"selling time frame, `1-3`, `3-6`, `6-12`, `12+`, `Just Looking`, `Refinancing`.","example":"1-3"},"mortgage":{"type":"string","description":"Mortgage, `Yes` or `No`.","example":"Yes"},"buyHouse":{"type":"string","description":"Buy a house, `Yes` or `No`.","example":"Yes"},"withListingAgent":{"type":"string","description":"With listing agent, `Yes` or `No`.","example":"Yes"},"leadTransaction":{"$ref":"#/components/schemas/LeadTransaction"},"leadFamilyMemberList":{"type":"array","description":"A list of family members associated with the lead. You can add up to 4 family members.","items":{"$ref":"#/components/schemas/LeadFamilyMember"}},"language":{"type":"string","description":"The lead's abbreviated language, `en`, `fr`, `de`, `es`, `zh-CN`, `zh-TW`, `ja`","example":"en"},"content":{"type":"string","description":"Note content","example":"example_note"},"isPin":{"type":"boolean","description":"Pin this note or not","example":false},"ownershipId":{"type":"integer","description":"The entity ID for the ownership scope. Required when `ownershipScope` is `OFFICE` (pass the office ID) or `PERSONAL` (pass the agent's user ID). Ignored when `ownershipScope` is `TEAM`.","format":"int64"},"ownershipScope":{"type":"string","description":"Controls the visibility scope of the lead. `TEAM` — Account-wide: visible to all users in this Lofty client account. `OFFICE` — visible only within the specified office (requires `ownershipId`). `PERSONAL` — visible only to the specified agent (requires `ownershipId`). Defaults to `PERSONAL` scope owned by the API caller if not specified. Note: `ownershipScope` = `TEAM` refers to the entire client account (the organization), not the Lofty \"Team add-on\" product."},"specifiedAssignGroupId":{"type":"boolean"},"defaultInquiryParam":{"type":"boolean"}},"description":"Lead info that needs to be added in"},"LeadTransactionPropertyAddress":{"required":["transactionId"],"type":"object","properties":{"transactionId":{"type":"integer","description":"Transaction ID whose property address is being queried or updated. Required on the update endpoint (carried in the request body, not the URL).","format":"int64","example":10001},"unit":{"type":"string","description":"Unit / apartment number.","example":"1"},"label":{"type":"string","description":"Free-form label for the address (e.g. 'Investment', 'Primary Residence').","example":"Investment"},"state":{"type":"string","description":"State or province code.","example":"CA"},"city":{"type":"string","description":"City.","example":"Los Angeles"},"zipCode":{"type":"string","description":"Postal / ZIP code.","example":"90012"},"streetAddress":{"type":"string","description":"Street address.","example":"100 W 1st St"},"county":{"type":"string","description":"County.","example":"Los Angeles"}}},"SavedSearchResumeRequest":{"required":["savedSearchIds"],"type":"object","properties":{"savedSearchIds":{"type":"array","description":"The saved searches of the lead to switch back on. Each resumes at the cadence it ran at before it was paused (frequencyBeforePause). A repeated id is resumed once.","items":{"type":"integer","format":"int64","example":88123456789}}}},"SavedSearchStatusChange":{"type":"object","properties":{"id":{"type":"integer","description":"Saved search id","format":"int64","example":88123456789},"category":{"type":"string","description":"Which emails the search sends","enum":["PROPERTY_ALERT","MARKET_SNAPSHOT"]},"result":{"type":"string","description":"What the call did to the search","enum":["PAUSED","RESUMED","ALREADY_INACTIVE","ALREADY_ACTIVE","PRIOR_FREQUENCY_UNKNOWN","NOT_CHANGED"]},"previousAlertFrequency":{"type":"string","description":"Cadence before the call","enum":["NEVER","TERMINATED","REFUSED","INSTANTLY","DAILY","WEEKLY","BIWEEKLY","MONTHLY"]},"alertFrequency":{"type":"string","description":"Cadence after the call","nullable":true,"enum":["NEVER","TERMINATED","REFUSED","INSTANTLY","DAILY","WEEKLY","BIWEEKLY","MONTHLY"]},"status":{"type":"string","description":"Status after the call","nullable":true,"enum":["ACTIVE","INACTIVE"]},"message":{"type":"string","description":"What to do next when the search was left unchanged; absent otherwise","nullable":true}},"description":"One entry per saved search the call selected"},"SavedSearchStatusChangesResponse":{"type":"object","properties":{"results":{"type":"array","description":"One entry per saved search the call selected","items":{"$ref":"#/components/schemas/SavedSearchStatusChange"}}}},"SavedSearchPauseRequest":{"type":"object","properties":{"categories":{"type":"array","description":"Pause every saved search of the lead of the given kinds. Give either categories or savedSearchIds, not both.","items":{"type":"string","example":"PROPERTY_ALERT","enum":["PROPERTY_ALERT","MARKET_SNAPSHOT"]}},"savedSearchIds":{"type":"array","description":"Pause the listed saved searches of the lead, whatever their kind. Give either categories or savedSearchIds, not both. A repeated id is paused once.","items":{"type":"integer","format":"int64","example":88123456789}}},"description":"Give either categories or savedSearchIds, not both.","example":{"categories":["PROPERTY_ALERT","MARKET_SNAPSHOT"]}},"LeadAssigineeRequest":{"required":["role"],"type":"object","properties":{"role":{"type":"string","description":"Role, `Agent`, `Assistant`, `Lender`","example":"Agent"},"assignee":{"type":"string","description":"Account of assignee","example":"info@lofty-mail.me"},"pondId":{"type":"integer","description":"ID of the lead pond to move the lead into, as returned by `GET /v1.0/team-features/lead-ponds`. Only valid on an `Agent` entry and in place of `assignee`: the pond replaces the agent assignee.","format":"int64","example":12345}}},"LeadActivity":{"required":["created","link","picture","text","type"],"type":"object","properties":{"type":{"type":"string","description":"Specifies the type of activity being logged for the lead.\n\n**Accepted Values:**\n- **Search**: When the lead performs a search operation (e.g., filtering by property type like Single Family Home)\n- **Browse**: When the lead views a property detail page\n- **Favorite**: When the lead saves a property to favorites\n- **Request**: When the lead submits a showing request for a property\n- **Submission**: When the lead submits a form on website\n","example":"Search"},"text":{"type":"string","description":"Search Text","example":"Search"},"link":{"type":"string","description":"Url for web page","example":"https://lofty.com"},"picture":{"type":"string","description":"Preview picture url","example":"https://lofty.com/default.jpg"},"listing":{"$ref":"#/components/schemas/LeadProperty"},"created":{"type":"integer","description":"created time in milliseconds","format":"int64","example":1747272300000},"scheduledDate":{"type":"string","description":"Scheduled date about this showing request"},"pageName":{"type":"string","description":"The page name of the lead's submission(re-inquiry) page","example":"Blog Registration"}}},"LeadAssigneeRequest":{"required":["email","firstName"],"type":"object","properties":{"firstName":{"type":"string","description":"The first name of the lead ","example":"Bob"},"lastName":{"type":"string","description":"The last name of the lead","example":"Li"},"email":{"type":"string","description":"The email address associated with the lead","example":"123456789@gmail.com"},"phone":{"type":"string","description":"The phone number associated with the lead. (No more than 20 characters per phone）","example":"1234567890"},"birthday":{"type":"string","description":"The birthday of the lead(pattern:MMM d, yyyy)","example":"Jun 5, 2001"}},"description":"Hypothetical lead info used to resolve assignees."},"CustomRoleAssignee":{"type":"object","properties":{"agentFullName":{"type":"string","description":"Agent Full Name"},"roleId":{"type":"integer","description":"The ID of this custom role","format":"int32"},"role":{"type":"string","description":"The name of this custom role"},"assigneeId":{"type":"integer","description":"The user id of this custom role","format":"int64"},"assignee":{"type":"string","description":"The user account of this custom role"},"permissionProfileName":{"type":"string","description":"The permission profile name of this custom role"}},"description":"lead customRoleAssignees"},"LeadCustomRoleAssigneeInfo":{"type":"object","properties":{"leadId":{"type":"integer","description":"leadId","format":"int64"},"leadUserId":{"type":"integer","description":"leadUserId","format":"int64"},"firstName":{"type":"string","description":"lead firstName"},"lastName":{"type":"string","description":"lead lastName"},"customRoleAssignees":{"type":"array","description":"lead customRoleAssignees","items":{"$ref":"#/components/schemas/CustomRoleAssignee"}}}},"AgentTagRequest":{"type":"object","properties":{"tagNames":{"type":"array","description":"Tag names to add to the agent. Up to 20 per call.","example":["VIP","Premium"],"items":{"type":"string","example":"VIP"}},"autoCreate":{"type":"boolean","description":"When true, tag names that do not yet exist on the team are created automatically. When false, unknown tag names cause the call to fail.","example":true,"default":false}},"description":"Tag batch payload."},"AddAgentTagResponse":{"type":"object","properties":{"data":{"type":"boolean","description":"Whether all requested tags were added successfully.","example":true},"errorCode":{"type":"integer","description":"Business error code. 0 indicates success.","format":"int32","example":0},"errorMsg":{"type":"string","description":"Human-readable error message when errorCode != 0."}},"description":"Response for POST /v1.0/agent/{agentId}/tag/add. Envelope that carries the batch result and an error code when the operation fails."},"ResultBoolean":{"type":"object","properties":{"data":{"type":"boolean"},"errorCode":{"type":"integer","format":"int32"},"errorMsg":{"type":"string"},"errorData":{"$ref":"#/components/schemas/JsonNode"}}},"OpportunityNotificationRequest":{"required":["leadId","notificationType"],"type":"object","properties":{"leadId":{"type":"integer","description":"Lead ID. Must belong to the caller's team.","format":"int64","example":100001},"description":{"type":"string","description":"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.","example":"123 Main St, San Francisco, CA 94102"},"link":{"type":"string","description":"Companion URL to description (see description field). Typically a listing / search / CMA URL.","example":"https://example.com/listing/123"},"message":{"type":"string","description":"Optional free-text message. Rendered only for notificationType values that carry a leave-message context (e.g. 65); ignored by all other types.","example":"I'd like to schedule a tour this weekend."},"notificationType":{"type":"integer","description":"Opportunity trigger type. Must match one of the supported activity codes.\n\nSite-origin values:\n 9  = Saved a listing\n 10 = Searched\n 11 = Viewed a listing\n 27 = Saved a search\n 46 = Requested to sell a house\n 47 = Requested home evaluation\n 65 = Left a message\n 66 = Requested a showing\n 89 = Used mortgage calculator\n162 = Requested CMA\n164 = Requested financing options\n\nNewHome-origin equivalents:\n 48 = Browsed a home\n 50 = Searched a home\n 52 = Favorited a home\n\nCApp-origin equivalents:\n136 = Favorited\n137 = Searched\n138 = Browsed\n139 = Showing request\n140 = Saved search\n141 = House evaluation\n\nOther:\n165 = Re-inquired on text code\n166 = Back to site (view a listing)\n167 = Submitted a form\n168 = Viewed CMA","format":"int32","example":11,"enum":[9,10,11,27,46,47,48,50,52,65,66,89,136,137,138,139,140,141,162,164,165,166,167,168]}}},"SendOpportunityNotificationResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/SendOpportunityNotificationResponse.Status"},"data":{"type":"boolean","description":"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":true}},"description":"Wrapped response for POST /v1.0/agent/send-notification."},"SendOpportunityNotificationResponse.Status":{"type":"object","properties":{"code":{"type":"integer","description":"Response code; 0 indicates success.","format":"int32","example":0},"msg":{"type":"string","description":"Response message.","example":"success"}},"description":"Status envelope; code=0 indicates the request was processed."},"AccountInfo":{"required":["emailAddress","firstName","lastName"],"type":"object","properties":{"headUrl":{"type":"string","description":"The head url of the agent","example":"http://xxx"},"lastName":{"type":"string","description":"last name of the agent","example":"Bob"},"firstName":{"type":"string","description":"first name of the agent","example":"Bob"},"emailAddress":{"type":"string","description":"email address of the agent","example":"aaaa@google.com"},"phoneNumber":{"type":"string","description":"phone number of the agent","example":"83834748"},"phoneCode":{"type":"string","description":"phone code of the agent","example":"000001"},"phoneCountry":{"type":"string","description":"phone country of the agent","example":"000001"},"tagIds":{"type":"array","description":"tags of the agent","example":[12345,67890],"items":{"type":"integer","format":"int64","example":12345}},"sendingEmail":{"type":"string"},"domain":{"type":"string"},"allowChangeDomain":{"type":"boolean"},"roleName":{"type":"string","description":"roleName","example":"role of the agent"},"groupId":{"type":"integer","format":"int64"},"roleId":{"type":"integer","format":"int64"},"seatTypeName":{"type":"string","description":"the seat type code of the agent","example":"Full Time Agent"}},"description":"Account Base Info of agent, like name , email or phone and something else"},"AgentLicense":{"type":"object","properties":{"label":{"type":"string","description":"License label, free text","example":"CA DRE#"},"value":{"type":"string","description":"License number","example":"01234567"}},"description":"License entries of the agent (up to 5). When provided it replaces the whole list ([] clears all); when absent the existing entries are left untouched."},"AgentProfile":{"required":["accountInfo","accountType"],"type":"object","properties":{"accountType":{"type":"integer","description":"The account type of the agent","format":"int32"},"accountInfo":{"$ref":"#/components/schemas/AccountInfo"},"workInfo":{"$ref":"#/components/schemas/WorkInfo"},"socialMedias":{"$ref":"#/components/schemas/SocialMedias"},"personalPhotos":{"$ref":"#/components/schemas/PersonalPhotos"},"hasBackOffice":{"type":"boolean"},"agentPid":{"type":"string"},"fullSync":{"type":"boolean"},"shouldSync":{"type":"boolean"},"checkRosterNum":{"type":"boolean"}},"description":"Agent profile payload."},"FileInfo":{"type":"object","properties":{"fileName":{"type":"string"},"size":{"type":"integer","format":"int32"},"queryLink":{"type":"string"},"contentType":{"type":"string"}}},"Item":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}}},"PersonalPhotos":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"}}},"description":"Personal photos of agent "},"SocialMedias":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}},"description":"Social media of agent, include company info "},"WorkInfo":{"type":"object","properties":{"streetAddress":{"type":"string","description":"Street Address","example":"123 Main St"},"city":{"type":"string","description":"City","example":"New York"},"country":{"type":"string","description":"Country","example":"US"},"state":{"type":"string","description":"State","example":"NY"},"zipcode":{"type":"string","description":"Zipcode","example":"10001"},"licenseId":{"type":"string","description":"DEPRECATED - use licenses instead. Single-value license; on create it is auto-converted to the first licenses entry when licenses is absent.","example":"xxx"},"licenses":{"type":"array","description":"License entries of the agent (up to 5). When provided it replaces the whole list ([] clears all); when absent the existing entries are left untouched. Takes precedence over licenseId.","items":{"$ref":"#/components/schemas/AgentLicense"}},"companyName":{"type":"string","description":"Company Name","example":"xxx"},"companyAddress":{"type":"string","description":"Company Address","example":"xxx"},"position":{"type":"string","description":"position","example":"xxx"},"personalWebsite":{"type":"string","description":"Personal Website","example":"xxx"},"personalAttachments":{"type":"array","items":{"$ref":"#/components/schemas/FileInfo"}},"personalDisclaimers":{"type":"array","items":{"$ref":"#/components/schemas/FileInfo"}},"personalIntroduction":{"type":"string","description":"Personal Introduction","example":"xxx"}},"description":"Work Info of agent, include company info etc.."},"AddAgentResponse":{"type":"object","properties":{"data":{"type":"integer","description":"User ID of the newly created agent. Zero when creation fails or an existing agent is returned without a new ID.","format":"int64","example":100234},"errorCode":{"type":"integer","description":"Business error code. 0 indicates success.","format":"int32","example":0},"errorMsg":{"type":"string","description":"Human-readable error message when errorCode != 0."}},"description":"Response for POST /v1.0/agent/profile/add. Envelope that carries the new agent's user ID and an error code when creation fails."},"ResultLong":{"type":"object","properties":{"data":{"type":"integer","format":"int64"},"errorCode":{"type":"integer","format":"int32"},"errorMsg":{"type":"string"},"errorData":{"$ref":"#/components/schemas/JsonNode"}}},"CommunicationRequest":{"required":["endTime","startTime","type"],"type":"object","properties":{"type":{"type":"string","description":"CALL, EMAIL OR TEXT","example":"CALL","enum":["CALL","TEXT","EMAIL","ALL"]},"startTime":{"type":"integer","description":"startTimestamp","format":"int64","example":946710000000},"endTime":{"type":"integer","description":"endTimestamp (The maximum time interval for a single query is 24 hours)","format":"int64","example":946710000000},"offset":{"type":"integer","description":"offset  default Value 0","format":"int32","example":0},"limit":{"type":"integer","description":"limit default Value 10,max value 1000","format":"int32","example":50},"teamView":{"type":"boolean","description":"search team lead's communication, default false","example":false}},"description":"Communication search request payload."},"PageResult":{"type":"object","properties":{"offset":{"type":"integer","description":"current offset","format":"int32","example":0},"limit":{"type":"integer","description":"limit","format":"int32","example":500},"pageData":{"type":"array","description":"page data","items":{"type":"object"}},"hasMore":{"type":"boolean","description":"has more","example":true}}},"ShowingUpdateRequestV2":{"type":"object","properties":{"startAt":{"type":"string","description":"New start, ISO 8601 with offset. May be sent without endAt.","example":"2026-11-01T11:00:00-07:00"},"endAt":{"type":"string","description":"New end, ISO 8601 with offset. May be sent without startAt.","example":"2026-11-01T11:30:00-07:00"},"status":{"type":"string","description":"New status.","example":"completed","enum":["requested","scheduled","in_progress","completed","denied","expired","cancelled"]},"note":{"type":"string","description":"Replaces the note.","example":"Showing went well"}},"description":"Fields to change."},"PaginationMetadata":{"type":"object","properties":{"total":{"type":"integer","description":"Total count of working leads matching the query","format":"int64","example":150},"count":{"type":"integer","description":"Count of leads in current response","format":"int32","example":20},"offset":{"type":"integer","description":"Offset of the current page","format":"int32","example":0},"limit":{"type":"integer","description":"Page size limit","format":"int32","example":20}},"description":"Pagination metadata"},"WorkingLeadListResponseV2":{"type":"object","properties":{"workingLeads":{"type":"array","description":"List of working leads","items":{"$ref":"#/components/schemas/WorkingLeadV2"}},"metadata":{"$ref":"#/components/schemas/PaginationMetadata"}},"description":"Working lead list response with pagination"},"WorkingLeadV2":{"type":"object","properties":{"leadId":{"type":"integer","description":"Lead ID","format":"int64","example":12345},"firstName":{"type":"string","description":"First name","example":"Jane"},"lastName":{"type":"string","description":"Last name","example":"Smith"},"email":{"type":"string","description":"Email address","example":"jane.smith@example.com"},"phone":{"type":"string","description":"Phone number","example":"+1234567890"},"workingStartedAt":{"type":"string","description":"When the Sales Agent started its latest follow-up of this lead (ISO8601, caller's time zone); null when the Sales Agent service has no start time for the lead","nullable":true,"example":"2026-11-26T11:49:04-08:00"},"salesAgentType":{"type":"string","description":"personal / team: one of the caller's usable Sales Agents; other: a Sales Agent the caller cannot use; null when the Sales Agent service has no record of the lead","nullable":true,"example":"team","enum":["personal","team","other"]},"ownerUserId":{"type":"integer","description":"User ID of the working Sales Agent's owner","format":"int64","nullable":true,"example":67890},"ownerName":{"type":"string","description":"Full name of the working Sales Agent's owner","nullable":true,"example":"Ashley Smith"},"assistantName":{"type":"string","description":"Name of the working AI","nullable":true,"example":"Anna"}},"description":"A lead a Sales Agent is working, and which Sales Agent works it"},"FeatureAreaDetail":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"integer","format":"int32"},"name":{"type":"string"},"displayName":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"neighborhood":{"type":"string"},"tag":{"type":"string"},"backPic":{"type":"string"},"detail":{"type":"string"},"faq":{"type":"string"},"updateTime":{"type":"integer","format":"int64"},"pages":{"type":"array","items":{"$ref":"#/components/schemas/FeatureAreaPageItem"}}}},"FeatureAreaPageItem":{"type":"object","properties":{"relationId":{"type":"integer","format":"int64"},"type":{"type":"integer","format":"int32"},"typeName":{"type":"string"},"pageId":{"type":"integer","format":"int64"},"url":{"type":"string"},"useDefaultPage":{"type":"boolean"}}},"RobotsGroup":{"type":"object","properties":{"userAgents":{"type":"array","items":{"type":"string"}},"disallow":{"type":"array","items":{"type":"string"}}}},"RobotsInfo":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/RobotsGroup"}},"sitemapDeclared":{"type":"boolean"}}},"SitemapInfo":{"type":"object","properties":{"urlCount":{"type":"integer","format":"int32"}}},"TechnicalFile":{"type":"object","properties":{"key":{"type":"string"},"url":{"type":"string"},"httpStatus":{"type":"integer","format":"int32"},"exists":{"type":"boolean"},"sizeBytes":{"type":"integer","format":"int64"},"lastModified":{"type":"integer","format":"int64"},"fetchError":{"type":"string"}}},"TechnicalFiles":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/TechnicalFile"}},"robots":{"$ref":"#/components/schemas/RobotsInfo"},"sitemap":{"$ref":"#/components/schemas/SitemapInfo"}}},"TechnicalFilesSection":{"type":"object","properties":{"section":{"type":"string"},"siteId":{"type":"integer","format":"int64"},"generatedAt":{"type":"integer","format":"int64"},"partial":{"type":"boolean"},"data":{"$ref":"#/components/schemas/TechnicalFiles"}}},"FeatureAreaHomeLinks":{"type":"object","properties":{"state":{"type":"string"},"count":{"type":"integer","format":"int32"},"matched":{"type":"array","items":{"$ref":"#/components/schemas/Matched"}}}},"Matched":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"via":{"type":"array","items":{"type":"string"}}}},"NavigationNode":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"},"external":{"type":"boolean"},"children":{"type":"array","items":{"$ref":"#/components/schemas/NavigationNode"}}}},"SiteStructure":{"type":"object","properties":{"navigation":{"type":"array","items":{"$ref":"#/components/schemas/NavigationNode"}},"totalPages":{"type":"integer","format":"int32"},"pageTypeCounts":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}},"featureAreaHomeLinks":{"$ref":"#/components/schemas/FeatureAreaHomeLinks"}}},"SiteStructureSection":{"type":"object","properties":{"section":{"type":"string"},"siteId":{"type":"integer","format":"int64"},"generatedAt":{"type":"integer","format":"int64"},"partial":{"type":"boolean"},"data":{"$ref":"#/components/schemas/SiteStructure"}}},"FeaturedAreaRef":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"source":{"type":"string"}}},"SeoSettings":{"type":"object","properties":{"brandName":{"type":"string"},"introVideoLink":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}},"featuredAreas":{"type":"array","items":{"$ref":"#/components/schemas/FeaturedAreaRef"}},"featuredAreaCount":{"type":"integer","format":"int32"},"featureAreaVersion":{"type":"string"}}},"SeoSettingsSection":{"type":"object","properties":{"section":{"type":"string"},"siteId":{"type":"integer","format":"int64"},"generatedAt":{"type":"integer","format":"int64"},"partial":{"type":"boolean"},"data":{"$ref":"#/components/schemas/SeoSettings"}}},"PageItem":{"type":"object","properties":{"pageId":{"type":"integer","format":"int64"},"name":{"type":"string"},"path":{"type":"string"},"url":{"type":"string"},"pageKey":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"keywords":{"type":"string"},"rawTitle":{"type":"string"},"rawDescription":{"type":"string"},"rawKeywords":{"type":"string"},"titleLength":{"type":"integer","format":"int32"},"descriptionLength":{"type":"integer","format":"int32"},"h1":{"type":"string"},"h1Count":{"type":"integer","format":"int32"},"heroImageAltMissing":{"type":"boolean"},"hasSchema":{"type":"boolean"},"schemaTypes":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"integer","format":"int64"},"fetchError":{"type":"string"}}},"PageListSection":{"type":"object","properties":{"section":{"type":"string"},"siteId":{"type":"integer","format":"int64"},"generatedAt":{"type":"integer","format":"int64"},"partial":{"type":"boolean"},"data":{"$ref":"#/components/schemas/PageResultPageItem"}}},"PageResultPageItem":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PageItem"}}}},"PageDetail":{"type":"object","properties":{"pageId":{"type":"integer","format":"int64"},"name":{"type":"string"},"path":{"type":"string"},"url":{"type":"string"},"pageKey":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"keywords":{"type":"string"},"rawTitle":{"type":"string"},"rawDescription":{"type":"string"},"rawKeywords":{"type":"string"},"titleLength":{"type":"integer","format":"int32"},"descriptionLength":{"type":"integer","format":"int32"},"h1":{"type":"string"},"h1Count":{"type":"integer","format":"int32"},"heroImageAltMissing":{"type":"boolean"},"hasSchema":{"type":"boolean"},"schemaTypes":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"integer","format":"int64"},"fetchError":{"type":"string"},"schemaJson":{"type":"array","items":{"type":"string"}}}},"PageDetailSection":{"type":"object","properties":{"section":{"type":"string"},"siteId":{"type":"integer","format":"int64"},"generatedAt":{"type":"integer","format":"int64"},"partial":{"type":"boolean"},"data":{"$ref":"#/components/schemas/PageDetail"}}},"SiteOverview":{"type":"object","properties":{"siteId":{"type":"integer","format":"int64"},"domainName":{"type":"string"},"templateId":{"type":"integer","format":"int64"},"status":{"type":"integer","format":"int32"},"statusText":{"type":"string"},"pageCount":{"type":"integer","format":"int32"},"featureAreaCount":{"type":"integer","format":"int32"}}},"SiteOverviewSection":{"type":"object","properties":{"section":{"type":"string"},"siteId":{"type":"integer","format":"int64"},"generatedAt":{"type":"integer","format":"int64"},"partial":{"type":"boolean"},"data":{"$ref":"#/components/schemas/SiteOverview"}}},"BingWebmasterTools":{"type":"object","properties":{"connected":{"type":"boolean"},"verified":{"type":"boolean"},"expired":{"type":"boolean"},"expiresAt":{"type":"integer","format":"int64"},"accountEmail":{"type":"string"}}},"GoogleBusinessProfile":{"type":"object","properties":{"connected":{"type":"boolean"},"businessName":{"type":"string"},"viewUrl":{"type":"string"}}},"GoogleSearchConsole":{"type":"object","properties":{"connected":{"type":"boolean"},"verified":{"type":"boolean"},"accountEmail":{"type":"string"}}},"Integrations":{"type":"object","properties":{"googleSearchConsole":{"$ref":"#/components/schemas/GoogleSearchConsole"},"bingWebmasterTools":{"$ref":"#/components/schemas/BingWebmasterTools"},"googleBusinessProfile":{"$ref":"#/components/schemas/GoogleBusinessProfile"},"napConsistency":{"type":"array","items":{"$ref":"#/components/schemas/NapRow"}}}},"IntegrationsSection":{"type":"object","properties":{"section":{"type":"string"},"siteId":{"type":"integer","format":"int64"},"generatedAt":{"type":"integer","format":"int64"},"partial":{"type":"boolean"},"data":{"$ref":"#/components/schemas/Integrations"}}},"NapRow":{"type":"object","properties":{"field":{"type":"string"},"siteValue":{"type":"string"},"googleBusinessProfileValue":{"type":"string"},"same":{"type":"boolean"}}},"VisitorTypeBreakdown":{"type":"object","properties":{"newVisitors":{"$ref":"#/components/schemas/VisitorTypeItem"},"returningVisitors":{"$ref":"#/components/schemas/VisitorTypeItem"}}},"VisitorTypeItem":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"ratio":{"type":"number","format":"double"},"changeRate":{"type":"number","format":"double"}}},"MetricWithChange":{"type":"object","properties":{"value":{"type":"number","format":"double"},"lastValue":{"type":"number","format":"double"},"changeRate":{"type":"number","format":"double"}}},"TrafficOverview":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"timeZone":{"type":"string"},"visitors":{"$ref":"#/components/schemas/MetricWithChange"},"pageViews":{"$ref":"#/components/schemas/MetricWithChange"},"pageViewsPerVisitor":{"$ref":"#/components/schemas/MetricWithChange"}}},"PageTypeRow":{"type":"object","properties":{"pageType":{"type":"string"},"paid":{"type":"number","format":"double"},"organicSearch":{"type":"number","format":"double"},"organicSocial":{"type":"number","format":"double"},"email":{"type":"number","format":"double"},"ai":{"type":"number","format":"double"},"direct":{"type":"number","format":"double"},"other":{"type":"number","format":"double"},"total":{"type":"number","format":"double"}}},"PageTypeTraffic":{"type":"object","properties":{"pageViews":{"type":"array","items":{"$ref":"#/components/schemas/PageTypeRow"}},"visitors":{"type":"array","items":{"$ref":"#/components/schemas/PageTypeRow"}},"pageViewsPerVisitor":{"type":"array","items":{"$ref":"#/components/schemas/PageTypeRow"}}}},"DeviceBreakdown":{"type":"object","properties":{"hasData":{"type":"boolean"},"mobile":{"$ref":"#/components/schemas/DeviceItem"},"desktop":{"$ref":"#/components/schemas/DeviceItem"}}},"DeviceItem":{"type":"object","properties":{"pageViews":{"type":"integer","format":"int64"},"ratio":{"type":"number","format":"double"},"changeRate":{"type":"number","format":"double"}}},"SourceActivity":{"type":"object","properties":{"channel":{"type":"string"},"viewedPageViews":{"type":"integer","format":"int64"},"viewedVisitors":{"type":"integer","format":"int64"},"avgViewed":{"type":"number","format":"double"},"searchedPageViews":{"type":"integer","format":"int64"},"searchedVisitors":{"type":"integer","format":"int64"},"avgSearched":{"type":"number","format":"double"}}},"VisitorActivityBySource":{"type":"object","properties":{"avgViewed":{"type":"number","format":"double"},"avgSearched":{"type":"number","format":"double"},"bySource":{"type":"array","items":{"$ref":"#/components/schemas/SourceActivity"}}}},"HourlyActivity":{"type":"object","properties":{"maxVisitors":{"type":"integer","format":"int64"},"cells":{"type":"array","items":{"$ref":"#/components/schemas/HourlyActivityCell"}}}},"HourlyActivityCell":{"type":"object","properties":{"dayOfWeek":{"type":"integer","format":"int32"},"hour":{"type":"integer","format":"int32"},"visitors":{"type":"integer","format":"int64"}}},"TransactionV2Item":{"type":"object","properties":{"created":{"type":"integer","description":"Transaction creation timestamp, in milliseconds since Unix epoch (UTC).","format":"int64","example":1518078026000},"updated":{"type":"integer","description":"Transaction last-modified timestamp, in milliseconds since Unix epoch (UTC).","format":"int64","example":1518078026000},"transactionId":{"type":"integer","description":"Transaction ID.","format":"int64","example":10001},"leadId":{"type":"integer","description":"ID of the lead this transaction belongs to.","format":"int64","example":100001},"propertyId":{"type":"integer","description":"ID of the property linked to this transaction.","format":"int64","example":20001},"transactionName":{"type":"string","description":"Property address or deal name.","example":"123 Main St"},"leadName":{"type":"string","description":"Name of the lead this transaction belongs to.","example":"Bob Smith"},"agentName":{"type":"string","description":"Name of the agent assigned to this transaction.","example":"Jane Doe"},"assignedAgent":{"type":"integer","description":"User ID of the agent this transaction is assigned to.","format":"int64","example":100001},"transactionType":{"type":"string","description":"Transaction type. One of Purchase / Listing / Lease / Other.","example":"Purchase","enum":["Purchase","Listing","Lease","Other"]},"transactionStatus":{"type":"string","description":"Transaction status name as configured in the team's pipeline.","example":"Pre-contract"},"homePrice":{"type":"number","description":"Home price of the transaction.","example":1000000.0},"expectedCloseDate":{"type":"integer","description":"Expected close date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"closeDate":{"type":"integer","description":"Actual close date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"commissionRate":{"type":"number","description":"Commission rate, expressed as a percentage (e.g. 3 for 3%).","example":3},"gci":{"type":"number","description":"Gross Commission Income (GCI) of the transaction.","example":5000.0},"teamRevenue":{"type":"number","description":"Portion of the GCI attributed to the team.","example":1000.0},"agentRevenue":{"type":"number","description":"Portion of the GCI attributed to the agent.","example":4000.0},"appointmentDate":{"type":"integer","description":"Appointment date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"agreementSignedDate":{"type":"integer","description":"Agreement-signed date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"offerDate":{"type":"integer","description":"Offer date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"contractDate":{"type":"integer","description":"Contract date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"appraisalDate":{"type":"integer","description":"Appraisal date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"homeInspectionDate":{"type":"integer","description":"Home-inspection date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"escrowDate":{"type":"integer","description":"Escrow date, in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"expiration":{"type":"integer","description":"Expiration date (listing / contract), in milliseconds since Unix epoch (UTC).","format":"int64","example":1508580010000},"customFields":{"type":"array","description":"Custom field values associated with the transaction.","items":{"$ref":"#/components/schemas/CustomFieldRequest"}}},"description":"Transaction summary item returned by the V2 search API."},"TransactionV2PageResponse":{"type":"object","properties":{"pageNum":{"type":"integer","description":"Page number (0-based).","format":"int32","example":0},"pageSize":{"type":"integer","description":"Page size.","format":"int32","example":20},"totalCount":{"type":"integer","description":"Total number of matching transactions.","format":"int64","example":123},"pageData":{"type":"array","items":{"$ref":"#/components/schemas/TransactionV2Item"}}},"description":"Paginated response for transaction search."},"PipelineStageV2Item":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID of the stage. Stable across renames, so use it (not the name) as the key when mapping external stages to Lofty stages.","format":"int64","example":88001},"name":{"type":"string","description":"Stage display name as configured by the team. This is the value accepted by the create/update transaction APIs (matched case-insensitively).","example":"Under Contract"},"default":{"type":"boolean","description":"Whether this is the pipeline's first stage, used as the fallback when a transaction is created without an explicit status.","example":false}},"description":"A single stage of a transaction pipeline, in pipeline order."},"PipelineV2Item":{"type":"object","properties":{"transactionType":{"type":"string","description":"Transaction type this pipeline applies to. One of Purchase / Listing / Lease / Other.","example":"Purchase","enum":["Purchase","Listing","Lease","Other"]},"stages":{"type":"array","items":{"$ref":"#/components/schemas/PipelineStageV2Item"}}},"description":"A transaction pipeline: the ordered stages configured by the team for one transaction type."},"TransactionPipelinesV2Response":{"type":"object","properties":{"pipelines":{"type":"array","items":{"$ref":"#/components/schemas/PipelineV2Item"}}},"description":"Response for the list transaction pipelines API."},"TaskResponseV2":{"type":"object","properties":{"id":{"type":"integer","description":"The Id of the task","format":"int64"},"leadId":{"type":"integer","description":"The lead(Id) associated with the task","format":"int64"},"creatorId":{"type":"integer","description":"The creator's Id of the task","format":"int64"},"content":{"type":"string","description":"The content of the task"},"type":{"type":"string","description":"The type of the task"},"startAt":{"type":"string","description":"When this task/appointment starts. ISO8601 format with timezone, e.g., '2026-03-01T15:00:00GMT'"},"endAt":{"type":"string","description":"When this task/appointment ends (or expected completion time for regular tasks). ISO8601 format with timezone"},"timeZoneCode":{"type":"string","description":"Timezone code for this task/appointment","example":"America/Los_Angeles"},"allDay":{"type":"boolean","description":"Whether this is an all-day event","example":false},"finishFlag":{"type":"boolean","description":"If the task is finished or not"},"overdueFlag":{"type":"boolean","description":"If the task is overdue or not"},"finishTime":{"type":"string","description":"The finish time of the task"},"createTime":{"type":"string","description":"The create time of the task"},"lastUpdate":{"type":"string","description":"The last update time of the task"},"leadName":{"type":"string","description":"The lead's name associated with the task"},"leadEmail":{"type":"string","description":"The lead's email associated with the task"},"leadPhone":{"type":"string","description":"The lead's phone associated with the task"},"leadFirstName":{"type":"string","description":"The lead's first name of the task"},"leadLastName":{"type":"string","description":"The lead's last name of the task"},"reminderType":{"type":"integer","description":"The reminder's type of the task","format":"int32"},"assignedRole":{"type":"string","description":"The role of the task assigned to"},"assignedUser":{"type":"string","description":"The user of the task assigned to"},"teamId":{"type":"integer","description":"The team's Id associated with the task","format":"int64"},"subject":{"type":"string","description":"The subject of the task"},"body":{"type":"string","description":"The body of the task"},"assignedUserId":{"type":"integer","description":"The user's Id of the task assigned to","format":"int64"},"pipelineId":{"type":"integer","description":"The pipeline(Id) of the associated lead","format":"int64"},"queryInfo":{"type":"string","description":"The queryInfo of the task"},"leadUserId":{"type":"integer","description":"The lead's user Id associated with the task","format":"int64"},"queryId":{"type":"integer","description":"The queryId of the task","format":"int64"},"address":{"type":"string","description":"Address for appointment type tasks","example":"123 Main St, Los Angeles, CA"}}},"TaskV2ListResponse":{"type":"object","properties":{"tasks":{"type":"array","description":"Tasks and / or appointments matching the query.","items":{"$ref":"#/components/schemas/TaskResponseV2"}}},"description":"Wrapped response for GET /v2.0/tasks and GET /v2.0/tasks/my-tasks. Task entries are returned under the 'tasks' key."},"TaskV2SingleResponse":{"type":"object","properties":{"task":{"$ref":"#/components/schemas/TaskResponseV2"}},"description":"Wrapped response for GET /v2.0/tasks/{taskId}. The task entry is returned under the 'task' key."},"ShowingListResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ShowingListResponseV2"}},"description":"Wrapped response for GET /v2.0/showings. The result is returned under the 'data' key."},"ShowingListResponseV2":{"type":"object","properties":{"showings":{"type":"array","items":{"$ref":"#/components/schemas/ShowingV2"}},"page":{"type":"integer","description":"Page number, starting at 0.","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"total":{"type":"integer","description":"Total matching showings.","format":"int64"},"hasMore":{"type":"boolean"}},"description":"A page of showings."},"ShowingFeedbackListResponseEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ShowingFeedbackV2"}}},"description":"Wrapped response for GET /v2.0/showings/{id}/feedback. Feedback entries are returned under the 'data' key, oldest first."},"SalesAgentQuotaListResponseV2":{"type":"object","properties":{"quotas":{"type":"array","description":"One entry per usable Sales Agent, the caller's own first","items":{"$ref":"#/components/schemas/SalesAgentQuotaResponseV2"}}},"description":"Capacity of every Sales Agent the caller may use; empty when there is none"},"SalesAgentQuotaResponseV2":{"type":"object","properties":{"salesAgentType":{"type":"string","description":"personal or team","example":"team","enum":["personal","team","other"]},"ownerUserId":{"type":"integer","description":"User ID of the Sales Agent's owner, whose capacity this is","format":"int64","example":67890},"ownerName":{"type":"string","description":"Full name of the Sales Agent's owner","example":"Ashley Smith"},"assistantName":{"type":"string","description":"Name of the AI","example":"Anna"},"totalQuota":{"type":"integer","description":"How many leads the Sales Agent can work at the same time","format":"int64","example":100},"usedQuota":{"type":"integer","description":"Leads the Sales Agent is working now, across everyone sharing it. A concurrent count, not cumulative usage","format":"int32","example":45},"remainingQuota":{"type":"integer","description":"Leads it can still take on now","format":"int64","example":55}},"description":"Lead capacity of one Sales Agent the caller may use. Capacity is the number of leads the Sales Agent can work at the same time; it is not a monthly allowance and never resets. A borrowed team Sales Agent reports the team owner's pool"},"SalesAgentListResponseV2":{"type":"object","properties":{"salesAgents":{"type":"array","description":"The caller's usable Sales Agents (at most two: personal and team)","items":{"$ref":"#/components/schemas/SalesAgentResponseV2"}}},"description":"Every Sales Agent the caller may use, their own first; empty when there is none"},"SalesAgentResponseV2":{"type":"object","properties":{"id":{"type":"integer","description":"Sales Agent ID","format":"int64","example":12345},"ownerUserId":{"type":"integer","description":"User ID of the person this Sales Agent belongs to: the caller for a personal Sales Agent, the team owner for the team Sales Agent","format":"int64","example":67890},"ownerName":{"type":"string","description":"Full name of the Sales Agent's owner","example":"Ashley Smith"},"salesAgentType":{"type":"string","description":"personal: the caller's own Sales Agent; team: the team Sales Agent (a team owner's own Sales Agent is the team Sales Agent)","example":"personal","enum":["personal","team","other"]},"assistantName":{"type":"string","description":"Name of the AI","example":"Anna"},"assistantHeadUrl":{"type":"string","description":"Avatar URL of the AI","example":"https://example.com/ai-avatar.jpg"},"virtualNumber":{"type":"string","description":"The Sales Agent's virtual phone number","example":"+1234567890"},"virtualNumberCountry":{"type":"string","description":"Country code of the virtual number","example":"US"},"salesAgentIdentity":{"type":"string","description":"Identity the Sales Agent presents to leads","example":"10 years in real estate"},"planType":{"type":"string","description":"Plan of the Sales Agent's owner; null for a Sales Agent with no plan record","nullable":true,"example":"pro","enum":["freemium","pro","max","team"]},"status":{"type":"string","description":"ACTIVE when at least one channel is on; INACTIVE when every channel is off or the Sales Agent is deleted","example":"ACTIVE","enum":["ACTIVE","INACTIVE"]},"createdAt":{"type":"string","description":"Creation time (ISO8601, caller's time zone)","example":"2026-02-20T10:00:00-08:00"},"updatedAt":{"type":"string","description":"Last time the Sales Agent record changed (ISO8601, caller's time zone). Any change to the record counts, including system-side ones; AI follow-up activity does not","example":"2026-02-28T10:00:00-08:00"},"websiteChannel":{"type":"boolean","description":"Website chat channel is on","example":true},"textChannel":{"type":"boolean","description":"Text message channel is on","example":true},"emailChannel":{"type":"boolean","description":"Email channel is on","example":true},"callChannel":{"type":"boolean","description":"AI phone call channel is on","example":false}},"description":"A Sales Agent the caller may use: their own, or the team Sales Agent they borrow"},"LeadSalesAgentResponseV2":{"type":"object","properties":{"workingStatus":{"type":"string","description":"working: followed up now; stopped: a Sales Agent worked it and was stopped (the fields describe that Sales Agent); not_working: no Sales Agent works it","example":"working","enum":["working","stopped","not_working"]},"workingStartedAt":{"type":"string","description":"When the Sales Agent started its latest follow-up of this lead (ISO8601, caller's time zone); null when not known or not worked","nullable":true,"example":"2026-11-26T11:49:04-08:00"},"id":{"type":"integer","description":"Sales Agent ID","format":"int64","nullable":true,"example":12345},"ownerUserId":{"type":"integer","description":"User ID of the Sales Agent's owner","format":"int64","nullable":true,"example":67890},"ownerName":{"type":"string","description":"Full name of the Sales Agent's owner","nullable":true,"example":"Ashley Smith"},"salesAgentType":{"type":"string","description":"personal / team: one of the caller's usable Sales Agents; other: a Sales Agent the caller cannot use, e.g. another member's personal Sales Agent","nullable":true,"example":"personal","enum":["personal","team","other"]},"assistantName":{"type":"string","description":"Name of the AI","nullable":true,"example":"Anna"},"assistantHeadUrl":{"type":"string","description":"Avatar URL of the AI; null for salesAgentType other","nullable":true},"virtualNumber":{"type":"string","description":"The number this lead receives text messages from","nullable":true,"example":"+1234567890"},"virtualNumberCountry":{"type":"string","description":"Country code of the virtual number; null for salesAgentType other","nullable":true,"example":"US"},"planType":{"type":"string","description":"Plan of the Sales Agent's owner; null for salesAgentType other or with no plan record","nullable":true,"enum":["freemium","pro","max","team"]},"status":{"type":"string","description":"ACTIVE or INACTIVE, as in List Usable Sales Agents; null for salesAgentType other","nullable":true,"enum":["ACTIVE","INACTIVE"]},"hasQuotaSeat":{"type":"boolean","description":"Whether the Sales Agent's owner holds a valid seat; null for salesAgentType other","nullable":true}},"description":"Whether a Sales Agent is working the lead, and which one. When no Sales Agent works or worked the lead, every Sales Agent field is null"},"ActivityItem":{"type":"object","properties":{"id":{"type":"integer","description":"Timeline ID","format":"int64"},"leadId":{"type":"integer","description":"Lead ID","format":"int64"},"agentId":{"type":"integer","description":"Agent ID","format":"int64"},"activityTime":{"type":"string","description":"Activity time (ISO 8601)","example":"2026-03-19T10:30:00-07:00"},"channel":{"type":"string","description":"Communication channel: Call / Text / Email"},"communicationType":{"type":"string","description":"Communication type: Auto / Manual / Logged"},"direction":{"type":"string","description":"Direction: Inbound / Outbound"},"callingOutcome":{"type":"string","description":"Call outcome, e.g. Talked / No Answer (Call only)"},"leadPhoneNumber":{"type":"string","description":"Lead phone number (Call only)"},"emailEventType":{"type":"string","description":"Email event type: Sent / Opened / Bounced (Email only)"},"emailSubject":{"type":"string","description":"Email subject (Email only)"},"note":{"type":"string","description":"Note content from agent manual log (Logged only)"}}},"ActivityListResponse":{"type":"object","properties":{"activities":{"type":"array","description":"Unified call, text and email activities for the lead, sorted by activityTime ascending.","items":{"$ref":"#/components/schemas/ActivityItem"}}},"description":"Wrapped response for GET /v2.0/leads/{leadId}/activities. Activity entries are returned under the 'activities' key."},"TextResponse":{"type":"object","properties":{"id":{"type":"integer","description":"The ID of the text","format":"int64"},"leadId":{"type":"integer","description":"The lead(Id) associated with the text","format":"int64"},"direction":{"type":"string","description":"Outbound or Inbound text","example":"Outbound"},"agentId":{"type":"integer","description":"The related Agent ID","format":"int64"},"textOutcome":{"type":"string","description":"Text delivery status","example":"Delivered"},"textTime":{"type":"string","description":"The sending time of the text"},"textType":{"type":"string","description":"Manual or Auto text","example":"Auto"},"textContent":{"type":"string","description":"The content of the text","example":"Content"}}},"EmailResponse":{"type":"object","properties":{"id":{"type":"integer","description":"The ID of the email","format":"int64"},"leadId":{"type":"integer","description":"The lead(Id) associated with the email","format":"int64"},"direction":{"type":"string","description":"Outbound or Inbound email","example":"Outbound"},"agentId":{"type":"integer","description":"The related Agent ID","format":"int64"},"eventType":{"type":"string","description":"Sent, Opened or Bounced event","example":"Sent"},"emailEventTime":{"type":"string","description":"The event time of the email"},"emailType":{"type":"string","description":"Manual or Auto email","example":"Auto"},"emailSubject":{"type":"string","description":"The subject of the email"},"fromPond":{"type":"boolean","description":"Is the email sent from the lead pond"}}},"CallResponse":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the call.","format":"int64","example":563172647619608},"dialerCallRecordId":{"type":"integer","description":"Internal dialer call record ID.","format":"int64","example":400000012345},"userId":{"type":"integer","description":"User ID of the agent on the call.","format":"int64","example":100234},"userPhoneNumber":{"type":"string","description":"Phone number used by the agent.","example":"+14155550100"},"leadId":{"type":"integer","description":"ID of the lead on the call.","format":"int64","example":100001},"leadPhoneNumber":{"type":"string","description":"Phone number of the lead.","example":"+14155550199"},"direction":{"type":"string","description":"Direction of the call from the agent's point of view.","example":"Outbound","enum":["Outbound","Inbound"]},"status":{"type":"string","description":"Final call status.","example":"Completed","enum":["Completed","Missed","Failed","Busy","NoAnswer","VoiceMail"]},"startTime":{"type":"string","description":"Start time of the call, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","example":"2026-04-22 10:15:00"},"endTime":{"type":"string","description":"End time of the call, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","example":"2026-04-22 10:18:45"},"duration":{"type":"integer","description":"Call duration in seconds.","format":"int32","example":225},"callingOutcome":{"type":"string","description":"Outcome tag assigned by the agent.","example":"Talked","enum":["Talked","VoiceMessage","NoAnswer","BadNumber","DNCNumber","DNCContact"]},"rateScore":{"type":"integer","description":"Agent's subjective rating of the call, 0-5.","format":"int32","example":4},"recordingSwitch":{"type":"boolean","description":"Whether the call was recorded.","example":true},"showUserNumber":{"type":"string","description":"Phone number displayed to the lead (caller ID).","example":"+14155550100"},"createTime":{"type":"string","description":"Creation time of the call record, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","example":"2026-04-22 10:15:00"},"updateTime":{"type":"string","description":"Last-updated time of the call record, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","example":"2026-04-22 10:18:45"},"note":{"type":"string","description":"Free-text note entered by the agent for the call.","example":"Discussed pre-approval timeline."},"isMachineAnswered":{"type":"boolean","description":"Whether the call was answered by a voicemail / answering machine.","example":false},"price":{"type":"number","description":"Cost of the call in USD.","format":"double","example":0.02},"agentId":{"type":"integer","description":"User ID of the related agent.","format":"int64","example":100234},"elapsedTime":{"type":"string","description":"Time from dialing to connection, formatted as 'mm:ss' or similar.","example":"00:08"},"recordingUrl":{"type":"string","description":"Recording URL of the call; empty when the call has no recording. Returned only by the get-a-call-by-ID endpoint.","example":"https://anycall-file.lofty.com/recording/AC123/RE456"}},"description":"Call record."},"CommunicationCursorPage":{"type":"object","properties":{"data":{"type":"array","description":"Communication entries for this page.","items":{"$ref":"#/components/schemas/CommunicationResponse"}},"nextCursor":{"type":"string","description":"Opaque cursor for the next page. Pass it back as the 'cursor' parameter. Null when there are no more pages. A non-null value does not guarantee further entries: the next request may return an empty data array with nextCursor=null, which marks the end."},"hasMore":{"type":"boolean","description":"Whether more pages are available.","example":true},"limit":{"type":"integer","description":"Page size used for this query.","format":"int32","example":100},"totalCount":{"type":"integer","description":"Total number of matching entries for the whole query.","format":"int64","example":1234}}},"CommunicationResponse":{"type":"object","properties":{"id":{"type":"integer","description":"The ID of the communication","format":"int64"},"leadId":{"type":"integer","description":"The lead(Id) associated with the communication","format":"int64"},"agentId":{"type":"integer","description":"The related Agent ID","format":"int64"},"direction":{"type":"string","description":"Outbound or Inbound","example":"Outbound"},"callOutcome":{"type":"string","description":"Dialer call outcome","example":"Talked"},"callDuration":{"type":"string","description":"Dialer call duration"},"status":{"type":"string","description":"The communication status","example":"Delivered"},"communicationTime":{"type":"string","description":"The time of the communication"},"communicationType":{"type":"string","description":"The communication type (AUTO, MANUAL OR LOGGED)","example":"AUTO"},"eventType":{"type":"string","description":"The event type (Call, Text, Opened Email, Bounced Email or Sent Email)","example":"Call"},"fromPond":{"type":"boolean","description":"Is the communication from the lead pond"}}},"CalendarItemV2":{"type":"object","properties":{"id":{"type":"string","description":"Calendar ID with type suffix (e.g., '12345-task' or '12345-appointment')","example":"12345-task"},"type":{"type":"string","description":"Calendar type for identification only (TASK or APPOINTMENT)","example":"TASK"},"taskId":{"type":"integer","description":"Task ID associated with the calendar item","format":"int64"},"sourceType":{"type":"integer","description":"Source type code from calendar system","format":"int32"},"content":{"type":"string","description":"Event content/description"},"title":{"type":"string","description":"Event title (auto-generated from lead name + event type)"},"finished":{"type":"boolean","description":"Whether the calendar item is finished","example":false},"startAt":{"type":"string","description":"Start time in ISO8601 format"},"endAt":{"type":"string","description":"End time in ISO8601 format"},"startAtMs":{"type":"integer","description":"Start time as Unix timestamp in milliseconds","format":"int64"},"endAtMs":{"type":"integer","description":"End time as Unix timestamp in milliseconds","format":"int64"},"timeZoneCode":{"type":"string","description":"Timezone code"},"leadId":{"type":"integer","description":"Lead ID","format":"int64","example":1234567890},"address":{"type":"string","description":"Location text. Only populated for an appointment fetched by id (GET /v2.0/calendar/{calendarId}); absent from list results."}},"description":"Unified calendar item representing Task, Appointment, or other calendar events"},"CalendarListResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CalendarListResponseV2"}},"description":"Response envelope for GET /v2.0/calendar. Wraps the paginated calendar list under the 'data' field."},"CalendarListResponseV2":{"type":"object","properties":{"total":{"type":"integer","description":"Total count of calendars matching the query","format":"int64","example":100},"page":{"type":"integer","description":"Current page number (starts from 0)","format":"int32","example":0},"pageSize":{"type":"integer","description":"Page size","format":"int32","example":20},"items":{"type":"array","description":"List of calendar items","items":{"$ref":"#/components/schemas/CalendarItemV2"}}},"description":"Calendar list response with pagination"},"CalendarItemResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CalendarItemV2"}},"description":"Envelope wrapping a single calendar item under 'data', returned by GET /v2.0/calendar/{calendarId}."},"AvailableMeetingSlotV2":{"type":"object","properties":{"startTime":{"type":"string","description":"Slot start time (ISO8601, e.g. 2024-01-15T09:00:00-08:00)"},"endTime":{"type":"string","description":"Slot end time (ISO8601, e.g. 2024-01-15T10:00:00-08:00)"},"startTimeMs":{"type":"integer","description":"Slot start time as Unix timestamp in milliseconds","format":"int64"},"endTimeMs":{"type":"integer","description":"Slot end time as Unix timestamp in milliseconds","format":"int64"}},"description":"Available meeting time slot"},"AvailableMeetingsResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AvailableMeetingsResponseV2"}},"description":"Response envelope for GET /v2.0/calendar/meetings/available. Wraps the available meeting slots under the 'data' field."},"AvailableMeetingsResponseV2":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of available meeting slots","format":"int32"},"slots":{"type":"array","description":"List of available meeting slots (sorted by startTime ascending, up to limit)","items":{"$ref":"#/components/schemas/AvailableMeetingSlotV2"}}},"description":"Available meeting time slots response"},"CallSummaryResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Status"},"data":{"$ref":"#/components/schemas/RecordingSummary"}},"description":"Call summary response"},"Keyword":{"type":"object","properties":{"content":{"type":"string","description":"Keyword content","example":"John Smith"},"type":{"type":"string","description":"Keyword type","example":"leadName","enum":["leadName","leadPhone","leadEmail","propertyLocation","propertyPrice","propertyType","bedroom","bathroom","apptTime","apptLocation","participants"]},"params":{"type":"array","description":"Additional parameters for the keyword","items":{"type":"object","description":"Additional parameters for the keyword"}}},"description":"Extracted keyword from call"},"RecordingSummary":{"type":"object","properties":{"id":{"type":"integer","description":"Summary record ID","format":"int64","example":12345},"recordingId":{"type":"integer","description":"Recording ID","format":"int64","example":98765},"status":{"type":"integer","description":"Processing status: 0=pending, 1=processing, 2=finished, 3=failed","format":"int32","example":2},"userId":{"type":"integer","description":"User ID","format":"int64","example":67890},"text":{"type":"string","description":"Full transcription text of the recording"},"summary":{"type":"string","description":"AI-generated call summary"},"keywords":{"type":"array","description":"Extracted keywords from the call","items":{"$ref":"#/components/schemas/Keyword"}},"score":{"type":"integer","description":"Call quality score","format":"int32","example":85},"comment":{"type":"string","description":"AI-generated comment on the call"}},"description":"Recording summary details"},"Status":{"type":"object","properties":{"code":{"type":"integer","description":"Status code, 0 means success","format":"int32","example":0},"msg":{"type":"string","description":"Status message","example":"ok"}},"description":"Response status"},"VendorInfo":{"type":"object","properties":{"id":{"type":"integer","description":"Internal vendor record ID, stable within the team. Distinct from the OAuth vendorId used for authentication.","format":"int64","example":11},"agentUserId":{"type":"integer","description":"CRM user ID of the agent this vendor entry represents. 0 or null means the vendor is not linked to a CRM user account (e.g. external contractor-only entries).","format":"int64","example":100234},"firstName":{"type":"string","description":"Given name of the vendor.","example":"Alice"},"lastName":{"type":"string","description":"Family name of the vendor.","example":"Johnson"},"phoneNumber":{"type":"string","description":"Phone number, local subscriber part only (without country or area prefix). Combine with phoneCode and phoneCountry to reconstruct the full E.164 number.","example":"5551234567"},"phoneCode":{"type":"string","description":"Phone country calling code, digits only, no leading '+'.","example":"1"},"phoneCountry":{"type":"string","description":"ISO 3166-1 alpha-2 country code of the phone number.","example":"US"},"email":{"type":"string","description":"Primary email address of the vendor. May be empty when no email is on file.","example":"alice@example.com"},"roleName":{"type":"string","description":"Human-readable role name of the vendor within the team (e.g. 'Agent', 'Admin', 'Lender', 'Transaction Coordinator'). Internal role codes are not exposed.","example":"Agent"},"companyName":{"type":"string","description":"Company or brokerage name the vendor belongs to. May be empty.","example":"Lofty Realty"},"companyAddress":{"type":"string","description":"Street address of the vendor's company, free-form single line. May be empty.","example":"500 Congress Ave, Austin, TX 78701"}},"description":"A vendor (team member, sub-account or associated agent) attached to the caller's team."},"AgentInfo":{"type":"object","properties":{"licenseId":{"type":"string","description":"DEPRECATED - use licenses instead; ignored on update"},"licenses":{"type":"array","description":"License entries of the agent (up to 5). When provided it replaces the whole list ([] clears all); when absent the existing entries are left untouched.","items":{"$ref":"#/components/schemas/AgentLicense"}},"position":{"type":"string","description":"Agent position"},"companyName":{"type":"string","description":"Agent Company Name"},"companyAddress":{"type":"string","description":"Agent company Address"},"mlsAgentId":{"type":"string","description":"MLS Agent Id","readOnly":true},"agentPid":{"type":"string","description":"Agent Pid"}},"description":"Additional agent profile details."},"OfficeBo":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"teamId":{"type":"integer","format":"int64"},"parentId":{"type":"integer","format":"int64"},"websiteOwnerId":{"type":"integer","format":"int64"},"name":{"type":"string"},"type":{"type":"integer","format":"int32"},"phone":{"type":"string"},"phoneCode":{"type":"string"},"phoneCountry":{"type":"string"},"email":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zipcode":{"type":"string"},"streetAddress":{"type":"string"},"webSiteUrl":{"type":"string"},"createTime":{"type":"string","format":"date-time"},"updateTime":{"type":"string","format":"date-time"},"path":{"type":"string"},"showInSite":{"type":"boolean"},"defaultFlag":{"type":"boolean"},"allowManageSub":{"type":"boolean"},"agentCount":{"type":"integer","format":"int32"},"boundNumber":{"type":"string"},"creatorId":{"type":"integer","format":"int64"},"payerId":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["ACTIVE","PENDING","INACTIVE"]},"chargePlanServiceId":{"type":"string"},"image":{"type":"string"},"layer":{"type":"integer","format":"int32"},"unit":{"type":"boolean"},"childPath":{"type":"string"},"notUnit":{"type":"boolean"}}},"UserResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Team-member record ID.","format":"int64","example":11},"teamId":{"type":"integer","description":"ID of the team this member belongs to.","format":"int64","example":12345},"invitorUserId":{"type":"integer","description":"User ID of the member who invited this member.","format":"int64","example":100001},"memberUserId":{"type":"integer","description":"User ID of the team member.","format":"int64","example":100234},"role":{"type":"integer","description":"Numeric role code.","format":"int32","example":0},"roleName":{"type":"string","description":"Human-readable role name.","example":"Agent"},"firstLetter":{"type":"string","description":"First letter of the member's name, used for alphabetic grouping.","example":"A"},"email":{"type":"string","description":"Email address of the member.","example":"alice@example.com"},"firstName":{"type":"string","description":"Given name of the member.","example":"Alice"},"lastName":{"type":"string","description":"Family name of the member.","example":"Johnson"},"phoneNumber":{"type":"string","description":"Phone number of the member.","example":"+14155550199"},"status":{"type":"integer","description":"Numeric status code of the member.","format":"int32","example":1},"virtualNumber":{"type":"string","description":"Virtual number assigned to the member for dialer features. Empty string when no virtual number is assigned.","example":"+14155550100"},"newLeadCount":{"type":"integer","description":"Number of new (unassigned) leads routable to this member.","format":"int32","example":5},"assignedLeadCount":{"type":"integer","description":"Number of leads currently assigned to this member.","format":"int32","example":42},"isAdmin":{"type":"boolean","description":"Whether the member is an administrator of the team.","example":false},"agentInfo":{"$ref":"#/components/schemas/AgentInfo"},"timeZoneId":{"type":"string","description":"IANA time zone identifier for the member.","example":"America/Los_Angeles"},"groupId":{"type":"integer","description":"ID of the office / group this member belongs to.","format":"int64","example":12345},"groupName":{"type":"string","description":"Name of the office / group this member belongs to.","example":"North Austin Office"},"accountType":{"type":"string","description":"Account type of the member: normal (platform user) or roster (Display Only member, listed by GET /v1.0/members only when accountTypes includes roster).","example":"normal","enum":["normal","roster"]},"headUrl":{"type":"string","description":"Avatar URL of the member.","example":"https://cdn.example.com/avatar/100234.jpg"},"group":{"$ref":"#/components/schemas/OfficeBo"},"accountStatus":{"type":"string"}}},"TransactionFormResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Field group id. Pass in `formIds` when creating a custom field.","format":"int64","example":301},"name":{"type":"string","description":"Field group display name.","example":"Dates"},"type":{"type":"integer","description":"Transaction type the group belongs to. Groups do not span types, so this echoes the `type` that was queried.","format":"int32","example":1}}},"UserLeadTag":{"type":"object","properties":{"leadId":{"type":"integer","format":"int64"},"tagId":{"type":"integer","format":"int64"},"createTime":{"type":"string","format":"date-time"},"updateTime":{"type":"string","format":"date-time"},"tagName":{"type":"string"},"creatorUserId":{"type":"integer","format":"int64"},"visibleType":{"type":"integer","format":"int32"}}},"MetaData":{"type":"object","properties":{"collection":{"type":"string","description":"The element of the array","example":"note"},"limit":{"type":"integer","description":"Quantitative limitation of responded elements","format":"int32","example":10},"offset":{"type":"integer","description":"Start index of the responded elements","format":"int64","example":0},"total":{"type":"integer","description":"The sum of retrieved elements","format":"int64","example":50},"scrollId":{"type":"string","description":"Scroll ID for the search. You can then use the scroll ID to retrieve the next batch of results for the request."}},"description":"Pagination metadata (offset, limit, total, collection)."},"PipelineListResponse":{"type":"object","properties":{"get_metadata":{"$ref":"#/components/schemas/MetaData"},"pipelines":{"type":"array","description":"Lead pipeline entries on this page.","items":{"$ref":"#/components/schemas/PipelineResponse"}}},"description":"Response for GET /v1.0/teamFeatures/lead-pipelines: a page of lead pipeline entries with pagination metadata."},"PipelineResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Lead pipeline ID.","format":"int64","example":100234},"name":{"type":"string","description":"Lead pipeline display name.","example":"Active"}},"description":"Lead pipeline entry visible to the caller's team."},"LeadPond":{"required":["id","pondName","pondOwnerId"],"type":"object","properties":{"id":{"type":"integer","description":"The id of this lead pond","format":"int64"},"pondName":{"type":"string","description":"The name of this lead pond"},"pondOwnerId":{"type":"integer","description":"The owner user id of the lead pond","format":"int64"},"agentIds":{"type":"array","description":"The accessible agent id of the lead pond, It's a list with user ids","example":[10000000514,10000000515],"items":{"type":"integer","format":"int64","example":10000000514}}}},"TaskListResponse":{"type":"object","properties":{"taskList":{"type":"array","description":"Tasks attached to the lead.","items":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Wrapped response for GET /v1.0/tasks. Task entries are returned under the 'taskList' key."},"TaskResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Task ID.","format":"int64","readOnly":true,"example":563172647619608},"leadId":{"type":"integer","description":"ID of the lead this task belongs to.","format":"int64","example":100001},"creatorId":{"type":"integer","description":"User ID of the task's creator.","format":"int64","readOnly":true,"example":100234},"content":{"type":"string","description":"Task description.","example":"Send an email to my lead"},"type":{"type":"string","description":"Type of the task.","example":"Call","enum":["Other","Call","Email","Text"]},"deadline":{"type":"string","description":"Deadline, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","example":"2026-04-22 17:00:00"},"finishTime":{"type":"string","description":"Completion time, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC. Empty string when the task has not been completed.","readOnly":true,"example":"2026-04-22 16:30:00"},"createTime":{"type":"string","description":"Creation time, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","readOnly":true,"example":"2026-04-20 09:00:00"},"lastUpdate":{"type":"string","description":"Last-modified time, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","readOnly":true,"example":"2026-04-20 09:00:00"},"deleteFlag":{"type":"boolean","description":"Whether the task has been deleted.","readOnly":true,"example":false},"finishFlag":{"type":"boolean","description":"Whether the task has been completed.","example":false},"overdueFlag":{"type":"boolean","description":"Whether the task is past its deadline and still open.","readOnly":true,"example":false},"leadName":{"type":"string","description":"Display name of the lead.","readOnly":true,"example":"Alice Johnson"},"leadEmail":{"type":"string","description":"Email of the lead.","readOnly":true,"example":"alice@example.com"},"leadPhone":{"type":"string","description":"Phone number of the lead.","readOnly":true,"example":"+14155550199"},"leadFirstName":{"type":"string","description":"Given name of the lead.","readOnly":true,"example":"Alice"},"leadLastName":{"type":"string","description":"Family name of the lead.","readOnly":true,"example":"Johnson"},"reminderType":{"type":"integer","description":"Reminder type code.","format":"int32","example":0},"assignedRole":{"type":"string","description":"Role the task is assigned to.","example":"Agent","enum":["Agent","Assistant"]},"assignedUser":{"type":"string","description":"Display name of the user assigned to this task.","readOnly":true,"example":"Alice Johnson"},"teamId":{"type":"integer","description":"ID of the team this task belongs to.","format":"int64","readOnly":true,"example":12345},"subject":{"type":"string","description":"Subject line. Only meaningful for Email-type tasks.","example":"Follow-up on Austin listings"},"body":{"type":"string","description":"Body text. Only meaningful for Email-type tasks.","example":"Discussed Austin inventory last week; sending the pre-approval doc now."},"assignedUserId":{"type":"integer","description":"User ID of the agent assigned to this task.","format":"int64","readOnly":true,"example":100234},"pipelineId":{"type":"integer","description":"Pipeline ID of the associated lead.","format":"int64","readOnly":true,"example":12345},"queryInfo":{"type":"string","description":"Query info string for smart plan tasks.","readOnly":true},"leadUserId":{"type":"integer","description":"User ID of the lead.","format":"int64","readOnly":true,"example":100001},"queryId":{"type":"integer","description":"Smart plan query ID.","format":"int64","readOnly":true}},"description":"Task entry, including pipeline context."},"TaskSingleResponse":{"type":"object","properties":{"task":{"$ref":"#/components/schemas/TaskResponse"}},"description":"Wrapped response for GET /v1.0/tasks/{taskId}. The task entry is returned under the 'task' key."},"SystemLogPageResponse":{"type":"object","properties":{"hasMore":{"type":"integer","description":"Whether more pages exist after the current one. 1 = more entries, 0 = last page.","format":"int32","example":1,"enum":[0,1]},"timeLines":{"type":"array","description":"Timeline entries on this page, sorted by timelineTime descending (newest first).","items":{"$ref":"#/components/schemas/SystemLogResponse"}}},"description":"Paginated response wrapping the system log timeline entries."},"SystemLogResponse":{"type":"object","properties":{"id":{"type":"string","description":"Timeline record ID (returned as a string).","example":"1224565260755697664"},"leadId":{"type":"integer","description":"The id of the lead.","format":"int64","example":1125957935106829},"agentId":{"type":"integer","description":"The id of the agent who triggered the event; 0 for system-generated events.","format":"int64","example":302656410082719},"timelineType":{"type":"integer","description":"The event type code. This endpoint only returns system / change-log activity types (it does not return call, text, email, note or site-activity entries). Use the companion `timelineTypeDesc` field for the human-readable name.","format":"int32","example":38},"timelineTypeDesc":{"type":"string","description":"The event name, derived from timelineType (e.g. \"TeamStageChange\" for 38). A stable enum identifier callers can switch on instead of mapping the integer themselves.","example":"TeamStageChange"},"timelineTime":{"type":"string","description":"When the event occurred (ISO-8601 with offset, UTC).","example":"2026-06-10T05:51:02.165+00:00"},"createTime":{"type":"string","description":"When the entry was created (ISO-8601 with offset, UTC).","example":"2026-06-10T05:51:59.727+00:00"},"updateTime":{"type":"string","description":"When the entry was last updated (ISO-8601 with offset, UTC).","example":"2026-06-10T05:51:59.727+00:00"},"fromId":{"type":"integer","description":"The id of the FROM party. Meaning depends on timelineType (see reference).","format":"int64","example":302656410082719},"fromType":{"type":"integer","description":"The type of the FROM party: 0=Other, 1=Agent, 2=Lead, 3=Stage, 5=Lender, 6=LeadPond, 10=Property.","format":"int32","example":1},"toId":{"type":"integer","description":"The id of the TO party. Meaning depends on timelineType (see reference).","format":"int64","example":1125957935106829},"toType":{"type":"integer","description":"The type of the TO party: 0=Other, 1=Agent, 2=Lead, 3=Stage, 5=Lender, 6=LeadPond, 10=Property.","format":"int32","example":2},"fromFirstName":{"type":"string","description":"The first name of the FROM party.","example":"Jane"},"fromLastName":{"type":"string","description":"The last name of the FROM party.","example":"Doe"},"toFirstName":{"type":"string","description":"The first name of the TO party.","example":"Sarah"},"toLastName":{"type":"string","description":"The last name of the TO party.","example":"Johnson"},"refId":{"type":"integer","description":"A business id referenced by this event (e.g. the task or routing record); 0 or -1 when not applicable.","format":"int64","example":2033115},"sticky":{"type":"boolean","description":"Whether this entry is pinned to the top of the timeline.","example":false},"canSticky":{"type":"boolean","description":"Whether the entry is eligible to be pinned.","example":false},"content":{"type":"object","description":"Event payload as a JSON object. Its structure varies by timelineType / timelineTypeDesc. For example, a stage change (38, \"Lead Stage Change\") carries `fromStageName`/`toStageName`; a smart-plan task (103) carries `taskType`/`taskContent`/`planName`.","example":{"fromStageName":"New","toStageName":"Active"}}}},"SupplementRoutingRule":{"type":"object","properties":{"roleId":{"type":"integer","description":"Role id","format":"int32"},"businessType":{"type":"integer","description":"Routing type","format":"int32"},"strategyType":{"type":"integer","description":"Strategy type","format":"int32"},"touchMinutes":{"type":"integer","description":"Only next up and blast alert are affected","format":"int32"},"assigneeAgentName":{"type":"string","description":"Only default assignee are affected"},"assigneeAgentId":{"type":"integer","description":"Only default assignee are affected","format":"int64"},"assigneeGroupName":{"type":"string","description":"Only default assignee are affected"},"assigneeGroupId":{"type":"integer","description":"Only default assignee are affected","format":"int64"},"updateTime":{"type":"integer","description":"Update time","format":"int64"}}},"LocationRule":{"type":"object","properties":{"locationMatchType":{"type":"integer","description":"Location match type","format":"int32"},"state":{"type":"string","description":"State setting","example":"NL"},"county":{"type":"string","description":"County setting"},"city":{"type":"string","description":"City setting"},"zipcode":{"type":"string","description":"Zipcode setting"},"streetAddress":{"type":"string","description":"StreetAddress setting"}},"description":"Location rule"},"RoutingRule":{"type":"object","properties":{"id":{"type":"integer","description":"Rule id","format":"int64"},"name":{"type":"string","description":"Rule name"},"locationRule":{"$ref":"#/components/schemas/LocationRule"},"sourceName":{"type":"string","description":"Lead source name"},"sourceMatchType":{"type":"integer","description":"Lead source name","format":"int32"},"tagNames":{"type":"array","description":"Lead tag name list","example":["Hot Lead","Zillow"],"items":{"type":"string","example":"Hot Lead"}},"tagMatchType":{"type":"integer","description":"Tag match type","format":"int32"},"groupNames":{"type":"array","description":"Lead segment name list","example":["First-Time Buyers","Downtown Area"],"items":{"type":"string","example":"First-Time Buyers"}},"groupMatchType":{"type":"integer","description":"Group match type","format":"int32"},"phone":{"type":"string","description":"Phone setting","example":"'With'、'Without'、 ''"},"priceMin":{"type":"integer","description":"Price min","format":"int64"},"priceMax":{"type":"integer","description":"Price max","format":"int64"},"leadType":{"type":"string","description":"lead type","example":"Other(-1),Seller(1),Buyer(2),B&S(3),Renter(5)"},"leadTypeFilters":{"type":"string","description":"multi lead type","example":"[{\"type\":\"one_of\",\"ids\":\"1,2,3\"},{\"type\":\"all\",\"ids\":\"1,2,3\"}]"},"activeHours":{"$ref":"#/components/schemas/ActiveHours"},"routingStrategy":{"$ref":"#/components/schemas/RoutingStrategy"},"ruleSwitch":{"type":"boolean","description":"Rule switch"},"updateTime":{"type":"integer","description":"Update time","format":"int64"}}},"AssignRole":{"type":"object","properties":{"id":{"type":"integer","description":"Role id","format":"int64"},"name":{"type":"string","description":"Role name"}}},"AssignMember":{"type":"object","properties":{"id":{"type":"integer","description":"Member id","format":"int64"},"name":{"type":"string","description":"Member name"},"type":{"type":"integer","description":"Member type","format":"int32"}}},"EnterpriseInfo":{"type":"object","properties":{"groupId":{"type":"integer","description":"Group ID","format":"int64"},"groupName":{"type":"string","description":"Group Name"},"profileId":{"type":"integer","description":"Permission Profile ID","format":"int64"},"profileName":{"type":"string","description":"Permission Profile Name"},"visibleOrgInfoList":{"type":"array","description":"Visible Sub Org Info","items":{"$ref":"#/components/schemas/VisibleOrgInfo"}}},"description":"If the client is on the \"Enterprise Package,\" the enterprise organization structure will be returned. Refer to \"EnterpriseInfo.\""},"MultiTeamInfo":{"type":"object","properties":{"multiTeamId":{"type":"integer","description":"Mult-Team ID","format":"int64"},"multiTeamName":{"type":"string","description":"Multi-Team Name"}},"description":"If the client is on the \"Multi-Team Package,\" the Multi-Team info will be returned."},"OrganizationInfo":{"type":"object","properties":{"orgType":{"type":"integer","description":"Organization type","format":"int64"},"enterpriseInfo":{"$ref":"#/components/schemas/EnterpriseInfo"},"multiTeamInfo":{"$ref":"#/components/schemas/MultiTeamInfo"}}},"VisibleOrgInfo":{"type":"object","properties":{"groupId":{"type":"integer","description":"Group ID","format":"int64"},"groupName":{"type":"string","description":"Group Name"},"parentId":{"type":"integer","description":"Parent Group ID","format":"int64"}},"description":"Visible Sub Org Info"},"PermissionProfile":{"type":"object","properties":{"id":{"type":"integer","description":"The Profile Id","format":"int64"},"name":{"type":"string","description":"The Profile Name"}}},"NoteListResponse":{"type":"object","properties":{"notes":{"type":"array","description":"Notes attached to the lead.","items":{"$ref":"#/components/schemas/NoteResponse"}}},"description":"Wrapped response for GET /v1.0/notes. Note entries are returned under the 'notes' key."},"NoteResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Timeline ID that carries this note.","format":"int64","readOnly":true,"example":563172647619608},"noteId":{"type":"integer","description":"Note ID. Use this value with GET/PUT/DELETE /v1.0/notes/{noteId}.","format":"int64","readOnly":true,"example":400000012345},"creatorId":{"type":"integer","description":"User ID of the note's creator.","format":"int64","readOnly":true,"example":100234},"leadId":{"type":"integer","description":"ID of the lead this note belongs to.","format":"int64","example":100001},"createTime":{"type":"string","description":"Creation time, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","readOnly":true,"example":"2026-04-22 10:15:30"},"deleteFlag":{"type":"boolean","description":"Whether the note has been deleted.","readOnly":true,"example":false},"content":{"type":"string","description":"Note content.","example":"Discussed Austin inventory, will send pre-approval doc tomorrow."},"lastUpdate":{"type":"string","description":"Last-modified time, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.","readOnly":true,"example":"2026-04-22 10:20:00"},"lastEditorId":{"type":"integer","description":"User ID of the most recent editor.","format":"int64","readOnly":true,"example":100234},"creatorName":{"type":"string","description":"Display name of the note's creator.","readOnly":true,"example":"Alice Johnson"},"lastEditorName":{"type":"string","description":"Display name of the most recent editor.","readOnly":true,"example":"Alice Johnson"},"isPin":{"type":"boolean","description":"Whether this note is pinned to the top of the lead's timeline.","example":false},"systemNote":{"type":"boolean","description":"Whether this is a system-generated note (e.g. automated activity). System notes are included only when includeSystemNote=true on the list endpoint.","readOnly":true,"example":false}},"description":"Note entry."},"NoteSingleResponse":{"type":"object","properties":{"note":{"$ref":"#/components/schemas/NoteResponse"}},"description":"Wrapped response for GET /v1.0/notes/{noteId}. The note entry is returned under the 'note' key."},"MemberListResponse":{"type":"object","properties":{"get_metadata":{"$ref":"#/components/schemas/MetaData"},"members":{"type":"array","description":"Team members on this page.","items":{"$ref":"#/components/schemas/UserResponse"}}},"description":"Response for GET /v1.0/members: a page of team members with pagination metadata."},"LogTypeListResponse":{"type":"object","properties":{"logType":{"type":"array","description":"Manual log entries on this page, ordered by the request's sort and order parameters.","items":{"$ref":"#/components/schemas/LogTypeResponse"}}},"description":"Wrapped response for GET /v1.0/logType. The manual log entries are returned under the 'logType' key."},"ListingMetaData":{"type":"object","properties":{"collection":{"type":"string"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"activeTotal":{"type":"integer","format":"int64"},"soldTotal":{"type":"integer","format":"int64"},"nextPageKey":{"type":"string"},"soldNextPageKey":{"type":"string"}},"description":"Listing search metadata: totals, pagination cursors, and filter echo."},"ListingSearchResponse":{"type":"object","properties":{"listIng":{"type":"object","description":"Active listings matching the search. Structure is a listing hub payload; fields depend on the listing source."},"soldListing":{"type":"object","description":"Sold listings matching the search. Same structure as listIng."},"get_listingMetadata":{"$ref":"#/components/schemas/ListingMetaData"}},"description":"Response for GET /v1.0/listing. Carries active-listing results, sold-listing results, and pagination / total metadata."},"CustomRole":{"required":["role","roleId"],"type":"object","properties":{"roleId":{"type":"integer","description":"The ID of this custom role","format":"int32"},"role":{"type":"string","description":"The name of this custom role"},"assigneeId":{"type":"integer","description":"The user id of this custom role","format":"int64"},"assignee":{"type":"string","description":"The user account of this custom role"}}},"LeadListResponse":{"type":"object","properties":{"get_metadata":{"$ref":"#/components/schemas/MetaData"},"leads":{"type":"array","items":{"$ref":"#/components/schemas/LeadResponse"}}}},"LeadResponse":{"type":"object","properties":{"cannotText":{"type":"boolean","description":"false: can send message to the lead"},"cannotCall":{"type":"boolean","description":"false: can call to the lead"},"cannotEmail":{"type":"boolean","description":"false: can email to the lead"},"leadId":{"type":"integer","description":"The Id of the lead","format":"int64"},"leadUserId":{"type":"integer","description":"The user Id of the lead","format":"int64"},"firstName":{"type":"string","description":"The first/given name of the lead"},"lastName":{"type":"string","description":"The last/family name of the lead"},"birthday":{"type":"string","description":"The birthday of the lead"},"emails":{"type":"array","description":"The email list of the lead","example":["jane.doe@example.com","jdoe-work@company.com"],"items":{"type":"string","example":"jane.doe@example.com"}},"phones":{"type":"array","description":"The phone list of the lead","example":["+14155551234","+12125559876"],"items":{"type":"string","example":"+14155551234"}},"leadSource":{"type":"integer","description":"The leadSource(Id) about the lead","format":"int32"},"source":{"type":"string","description":"The source of the lead"},"stageId":{"type":"integer","description":"The stageId of the lead","format":"int64"},"stage":{"type":"string","description":"The stage of the lead"},"assignedUserId":{"type":"integer","description":"The user Id of the lead assigned to","format":"int64"},"assignedUser":{"type":"string","description":"The Username of the lead assigned to"},"lenderUserId":{"type":"integer","description":"The user Id of the lead's lender","format":"int64"},"score":{"type":"integer","description":"The score of the lead","format":"int32"},"tags":{"type":"array","description":"The tags of the lead","items":{"$ref":"#/components/schemas/UserLeadTagVo"}},"teamId":{"type":"integer","description":"The teamId of the lead's team","format":"int64"},"streetAddress":{"type":"string","description":"The streetAddress associated with the lead. Deprecated: please use the streetAddress field in leadPropertyList instead.","deprecated":true},"city":{"type":"string","description":"The city associated with the lead. Deprecated: please use the city field in leadPropertyList instead.","deprecated":true},"state":{"type":"string","description":"The state associated with the lead. Deprecated: please use the state field in leadPropertyList instead.","deprecated":true},"zipCode":{"type":"string","description":"The zip code associated with the lead. Deprecated: please use the zipCode field in leadPropertyList instead.","deprecated":true},"createTime":{"type":"string","description":"The create time of the lead"},"assignTime":{"type":"string","description":"The assigned time of the lead"},"facebook":{"type":"string","description":"The Facebook account of the lead"},"twitter":{"type":"string","description":"The Twitter account of the lead"},"hiddenFlag":{"type":"boolean","description":"The lead is hidden or not"},"referredBy":{"type":"string","description":"The referee of the lead"},"leadInquiry":{"$ref":"#/components/schemas/LeadInquiry"},"leadPropertyList":{"type":"array","description":"LeadPropertyList","items":{"$ref":"#/components/schemas/LeadProperty"}},"customAttributes":{"type":"array","description":"User customized field","items":{"$ref":"#/components/schemas/CustomAttribute"}},"lastUpdateTime":{"type":"string","description":"The update time of the lead"},"groups":{"type":"array","description":"The groups that the lead in. Deprecated, use segments instead.","example":["VIP Clients","Open House Feb"],"deprecated":true,"items":{"type":"string","example":"VIP Clients"}},"segments":{"type":"array","description":"The segments that the lead in","example":["First-Time Buyers","Downtown Area"],"items":{"type":"string","example":"First-Time Buyers"}},"unsubscription":{"type":"boolean","description":"Unsubscription the email"},"leadTypes":{"type":"array","description":"Types of lead, expressed by ID. Type ID : Other (-1),  Seller (1), Buyer (2), Renter (5), Investor (6), Agent (7), Homeowner (8), Landlord (9)","example":[2,5],"items":{"type":"integer","format":"int32","example":2}},"lastTouch":{"type":"string","description":"The last touch time of the lead"},"lastVisit":{"type":"string","description":"The last visit time of the lead"},"phoneStatuses":{"type":"array","description":"The status of the phone number\nType id: invaild number(1), vaild number(2), talked(3), DNC Number(4), DNC Contact(5)","example":[2,3],"items":{"type":"integer","format":"int32","example":2}},"phoneConsentStates":{"type":"array","description":"The call & text communication consent of each phone, in the same order as phones","example":["Unknown consent","Do Not Call"],"items":{"type":"string","example":"Do Not Call","enum":["Do Not Call","Business Relationship","Unknown consent","System Recorded consent","User consent"]}},"assignCompletionStatus":{"type":"boolean","description":"Whether complete all lead assign process"},"buyingTimeFrame":{"type":"string","description":"buying time frame, `1-3`, `3-6`, `6-12`, `12+`, `Just Looking`, `Refinancing`.","example":"6-12"},"preQual":{"type":"string","description":"Pre-qual, `Yes` or `No`","example":"Yes"},"houseToSell":{"type":"string","description":"House to Sell, `Yes` or `No`","example":"Yes"},"fthb":{"type":"string","description":"first time home buyer, `Yes` or `No`","example":"Yes"},"withBuyerAgent":{"type":"string","description":"With buyer Agent, `Yes` or `No`","example":"Yes"},"sellingTimeFrame":{"type":"string","description":"selling time frame, `1-3`, `3-6`, `6-12`, `12+`, `Just Looking`, `Refinancing`.","example":"1-3"},"mortgage":{"type":"string","description":"Mortgage, `Yes` or `No`.","example":"Yes"},"buyHouse":{"type":"string","description":"Buy a house, `Yes` or `No`.","example":"Yes"},"withListingAgent":{"type":"string","description":"With listing agent, `Yes` or `No`.","example":"Yes"},"opportunity":{"type":"string","description":"The lead's current opportunity type, derived from on-platform lead scoring. One of: \"High Interest\", \"Sell\", \"Back to Site\", \"Back on Market\". Null when the lead has no active opportunity.","example":"High Interest","enum":["High Interest","Sell","Back to Site","Back on Market"]},"leadFamilyMemberList":{"type":"array","description":"A list of family members associated with the lead","items":{"$ref":"#/components/schemas/LeadFamilyMember"}},"pondId":{"type":"integer","description":"The Id of the lead's pond","format":"int64"},"pondName":{"type":"string","description":"The Name of the lead's pond"},"customRoleList":{"type":"array","items":{"$ref":"#/components/schemas/CustomRole"}},"language":{"type":"string","description":"The language of the lead"},"ownershipId":{"type":"integer","description":"The entity ID associated with `ownershipScope`: the office ID when scope is `OFFICE`, or the agent's user ID when scope is `PERSONAL`. Not applicable when scope is `TEAM`.","format":"int64"},"ownershipScope":{"type":"string","description":"The visibility scope of the lead. `TEAM` — Account-wide: visible to all users in this Lofty client account. `OFFICE` — visible only within a specific office. `PERSONAL` — visible only to a single agent. Note: `TEAM` refers to the entire client account (the organization), not the Lofty \"Team add-on\" product."}}},"UserLeadTagVo":{"type":"object","properties":{"leadId":{"type":"integer","format":"int64"},"tagId":{"type":"integer","format":"int64"},"createTime":{"type":"string"},"updateTime":{"type":"string"},"tagName":{"type":"string"},"creatorUserId":{"type":"integer","format":"int64"},"visibleType":{"type":"integer","format":"int32"}},"description":"The tags of the lead"},"SavedSearchListResponse":{"type":"object","properties":{"savedSearches":{"type":"array","description":"The lead's saved searches","items":{"$ref":"#/components/schemas/SavedSearch"}}}},"CommunicationTextListResponse":{"type":"object","properties":{"texts":{"type":"array","description":"Text message history entries.","items":{"$ref":"#/components/schemas/TextResponse"}}},"description":"Wrapped response for GET /v1.0/communication/text. Text message history entries are returned under the 'texts' key."},"CommunicationEmailListResponse":{"type":"object","properties":{"emails":{"type":"array","description":"Email history entries.","items":{"$ref":"#/components/schemas/EmailResponse"}}},"description":"Wrapped response for GET /v1.0/communication/email. Email history entries are returned under the 'emails' key."},"CommunicationCallListResponse":{"type":"object","properties":{"calls":{"type":"array","description":"Call history entries.","items":{"$ref":"#/components/schemas/CallResponse"}}},"description":"Wrapped response for GET /v1.0/communication/call. Call history entries are returned under the 'calls' key."},"CallHistory":{"type":"object","properties":{"id":{"type":"integer","description":"The Id of the call","format":"int64"},"agentId":{"type":"integer","description":"The Id of the agent","format":"int64"},"leadId":{"type":"integer","description":"The lead(Id) associated with the call","format":"int64"},"createTime":{"type":"string","description":"The createTime of the call"},"direction":{"type":"string","description":"Outbound or Inbound call","example":"outbound"},"leadPhoneNumber":{"type":"string","description":"The phone number of the lead"}}},"CommunicationCallV2ListResponse":{"type":"object","properties":{"calls":{"type":"array","description":"Call history entries.","items":{"$ref":"#/components/schemas/CallHistory"}}},"description":"Wrapped response for GET /v1.0/communication/call/v2. Call history entries (with expanded event types) are returned under the 'calls' key."},"CallListResponseV1":{"type":"object","properties":{"get_metadata":{"$ref":"#/components/schemas/MetaData"},"calls":{"type":"array","description":"Call records on this page.","items":{"$ref":"#/components/schemas/CallResponse"}}},"description":"Response for GET /v1.0/calls: a page of call records with pagination metadata."},"CallDetailResponse":{"type":"object","properties":{"calls":{"$ref":"#/components/schemas/CallResponse"}},"description":"Wrapped response for GET /v1.0/calls/{callId}. The call record is returned under the 'calls' key."},"CallRecordingUrl":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the call.","format":"int64","example":563172647619608},"url":{"type":"string","description":"Temporary download URL for the recording audio. Empty string when no recording is available for this call.","example":"https://anycall-file.lofty.com/recordings/abc123.mp3"}},"description":"Download URL for a call recording. The URL is valid for a limited time."},"CallUrlResponse":{"type":"object","properties":{"calls":{"$ref":"#/components/schemas/CallRecordingUrl"}},"description":"Wrapped response for GET /v1.0/call/url/{callId}. The recording URL payload is returned under the 'calls' key."},"Appointment":{"type":"object","properties":{"id":{"type":"integer","description":"The Id of the appointment","format":"int64"},"descr":{"type":"string","description":"The description of the appointment"},"address":{"type":"string","description":"The location of the appointment"},"createTime":{"type":"string","description":"The create time of the appointment","format":"date-time"},"lastUpdate":{"type":"string","description":"The last update time of the appointment","format":"date-time"},"deadline":{"type":"integer","description":"The start time of the appointment","format":"int64"},"endTime":{"type":"integer","description":"The end time of the appointment","format":"int64"},"allDay":{"type":"boolean","description":"Whether the appointment time is all day"},"finishFlag":{"type":"boolean","description":"If the appointment is finished or not"},"deleteFlag":{"type":"boolean","description":"If the appointment is deleted or not"},"overdue":{"type":"boolean","description":"If the appointment is overdue or not"},"finishTime":{"type":"integer","description":"The finish time of the task","format":"int64"},"leadId":{"type":"integer","description":"The lead(Id) associated with the appointment","format":"int64"},"assignToUid":{"type":"integer","description":"The user's Id of the appointment assigned to","format":"int64"},"assignRoleType":{"type":"integer","description":"The user role of the appointment assigned to","format":"int32"},"creatorId":{"type":"integer","description":"The user ID of this appointment creator","format":"int64"}}},"AuthorizationServerMetadata":{"type":"object","properties":{"token_endpoint":{"type":"string"},"grant_types_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"response_types_supported":{"type":"array","items":{"type":"string"}},"refresh_token_endpoint":{"type":"string"},"issuer":{"type":"string"}}},"SavedSearchDeleteResponse":{"type":"object","properties":{"savedSearchId":{"type":"integer","description":"ID of the deleted saved search","format":"int64","example":88123456789}}}}}}