---
title: "Get Sales Agent by lead ID"
method: GET
path: "/v2.0/sales-agents/by-lead"
tags: ["Sales Agents V2"]
---

# Get Sales Agent by lead ID

`GET /v2.0/sales-agents/by-lead`

## Request

- Base URL: `https://api.lofty.com`
- URL: `https://api.lofty.com/v2.0/sales-agents/by-lead`
- Auth: none required
- TypeScript: <https://skmtc.dev/lofty/apis/lofty-service-open-apis/docs/v2.0/sales-agents/by-lead/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves the Sales Agent (AI Assistant) configuration associated with the specified lead.

## Query parameters

- `leadId` integer, required

## Headers

- `Authorization` string, required

## Response `200`

Sales Agent found successfully

- SalesAgentResponseV2: Sales Agent information
  - `id` integer: Sales Agent ID
  - `userId` integer: User ID who owns this Sales Agent
  - `agentName` string: Agent's full name
  - `agentHeadUrl` string: Agent's avatar URL
  - `assistantName` string: AI Assistant name
  - `assistantHeadUrl` string: AI Assistant avatar URL
  - `virtualNumber` string: Virtual phone number
  - `virtualNumberCountry` string: Virtual number country code
  - `followUpRole` string: Follow-up role: buyer_agent, listing_agent, etc.
  - `agentExperience` string: Agent experience description
  - `email` string: AI Assistant email
  - `status` string: Status: ACTIVE, INACTIVE, etc.
  - `createdAt` string: Creation time in ISO8601 format
  - `updatedAt` string: Last update time in ISO8601 format
  - `hasQuotaSeat` boolean: Whether AI has valid quota seat
  - `borrowLevel` string: Borrow level if using borrowed AI: SELF, GROUP, TEAM
  - `borrowId` integer: Borrowed from user/office ID

## Other responses

- `400`: Invalid lead ID parameter.
- `401`: Missing or invalid authentication token.
- `403`: Caller does not have access to this lead.
- `404`: Sales Agent not found for the lead.
- `500`: Internal server error.

---

[API](https://skmtc.dev/lofty/apis/lofty-service-open-apis.md) - [All operations](https://skmtc.dev/lofty/apis/lofty-service-open-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/lofty/apis/lofty-service-open-apis/revisions/23e640467118?raw)
