# \[Deprecated] Get Last Lead

## Deprecation Notice

This API has been deprecated in favor of the Search Leads (v2) API. Use a sort order of ascending timestamp to identify the latest lead. This API will be kept alive until all clients have migrated but should not be used for new onboardings.

## Individuals

* **Get Last Lead**: Get the most recent lead that was collected via Popl

```javascript
GET https://api.popl.co/api/pub/leads/getLastLead
```

## Teams

* **Get Last Lead (Team)**: Get the most recent lead that anyone on your team collected via Popl

```javascript
GET https://api.popl.co/api/pub/leads/getLastLeadTeam
```

### Subteams

**Query Parameters**:

* subTeamId

```javascript
GET https://api.popl.co/api/pub/leads/getLastLeadSubTeam
```

## Understanding the Response&#x20;

```json
[
    {
        "name": "Popl",
        "isLead": true,
        "url": "https://poplme.co/popl-retail",
        "time": "Thursday, 1/28 2021",
        "views": "259824",
        "apptoapp": true,
        "pro": "1",
        "mode": "1",
        "lat": "34.05",
        "long": "-118.243683",
        "isLoggedIn": "",
        "email": "support@popl.co",
        "image": "23845_85b68a175436e991d41af4167f1af457.jpg",
        "company": "Tap to connect with us",
        "hash": "C88f",
        "epoch": 1687457494613,
        "v": "1",
        "number": "15106501841",
        "pops": "250556",
        "location": "Los Angeles, CA",
        "bio": "Your Digital Business Card",
        "id": "80149"
    }
]
```

The response is returned as a JSON array of a single lead object. The lead object has a unique identified called **"id",** which can be a integer, email address or phone number, depending on the type of lead and how it was collected.&#x20;

The lead object will also have an "**epoch**" value that signifies the time in milliseconds that the lead was collected.

The lead object also has multiple values that correspond to the Popl user that collected the lead:

* **userId**: The unique id of the Popl user that collected the lead
* **userEmail**: The unique email of the Popl user that collected the lead
* **userPid**: The profile id that corresponds to the Popl user's profile ID that was shared with the lead.

Each lead may also contain latitude and longitude information which when plotted on a map shows the precise location of where the meeting occurred. This data must be approved by the lead at the time of collection, otherwise, it will not be added to the lead object.

### Popl Field Data Dictionary

<table><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>attachments
</code></pre></td><td>An array of files associated with the lead.</td></tr><tr><td><pre><code>isManual
</code></pre></td><td>A boolean indicating whether the lead was manually entered (true) or automatically generated (false).</td></tr><tr><td><pre><code>epoch
</code></pre></td><td>A timestamp representing the creation time of the lead in milliseconds since the Unix epoch.</td></tr><tr><td><pre><code>number
</code></pre></td><td>The phone number associated with the lead.</td></tr><tr><td><pre><code>name
</code></pre></td><td>The full name of the lead.</td></tr><tr><td><pre><code>company
</code></pre></td><td>The company the lead is associated with.</td></tr><tr><td><pre><code>userEmail
</code></pre></td><td>The email address of the user who collected the lead.</td></tr><tr><td><pre><code>userPid
</code></pre></td><td>An identifier for the card of the user who collected the lead.</td></tr><tr><td><pre><code>id
</code></pre></td><td>A unique identifier for the lead.</td></tr><tr><td><pre><code>email
</code></pre></td><td>The email address of the lead.</td></tr><tr><td><pre><code>crm
</code></pre></td><td>A CRM-related object, containing integration data.</td></tr><tr><td><pre><code>image
</code></pre></td><td>A URL linking to the lead's image.</td></tr><tr><td><pre><code>website
</code></pre></td><td>The website URL associated with the lead.</td></tr><tr><td><pre><code>address
</code></pre></td><td>The physical address of the lead.</td></tr><tr><td><pre><code>linkedIn
</code></pre></td><td>The LinkedIn profile URL of the lead.</td></tr><tr><td><pre><code>jobTitle
</code></pre></td><td>The job title of the lead</td></tr></tbody></table>

Check out [Popl Teams](https://popl.co/pages/popl-teams) to instantly create high-converting digital business cards for your team.

If any issues or questions, please contact us at <teams@popl.co>, we are available nearly 24/7 and will get back to you within 6-8 hours or less.

\
With 🤍 from Popl.&#x20;
