> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/api/api-api-call-to-list-leads-and-lead-fields.md).

# API - API call to list Leads and Lead Fields

## List all Leads

<mark style="color:green;">`GET`</mark> `/leads`

Full endpoint: [https://sprinthub-api-master.sprinthub.app/leads?i=instancia](https://sprinthub-api-master.sprinthub.app/leadsadvanced?i=instancia)

i = name of your instance

**Body (example below in JSON)**

````json
{
    "data": {
        "total": 1134,
        "leads": [
            {
                "id": 2035,
                "fullname": "noreply-spamdigest via TeamDev",
                "email": "dev@sprinthub.com"
            },
            {
```

````

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |
| apitoken      | XXXXXXX            |

## List only ONE specific Lead

<mark style="color:green;">`GET`</mark> `/leads/LEAD_ID`

Full endpoint: [https://sprinthub-api-master.sprinthub.app/leads/2065?i=instancia](https://sprinthub-api-master.sprinthub.app/leadsadvanced?i=instancia)

```json
{
    "data": {
        "lead": {
            "id": 2065,
            "fullname": "BRKSUEDUTHSHbvncvbn werwerwe",
            "email": null
        }
    }
}
```

## List ALL fields of only ONE specific Lead

<mark style="color:green;">`GET`</mark> `/leads/LEAD_ID&`**allFields=1**

Full endpoint: [https://sprinthub-api-master.sprinthub.app/leads/2065?i=instancia](https://sprinthub-api-master.sprinthub.app/leadsadvanced?i=instancia)&**allFields=1**

````json
{
    "data": {
        "lead": {
            "points": 0,
            "owner": null,
            "stage": null,
            "photoUrl": "https://sprinthub.s3.amazonaws.com/unnamed_png.PNG",
            "company": null,
            "userAccess": [],
            "departmentAccess": [],
            "ignoreSubDepartments": false,
            "firstname": "BRKSUEDUTHSHbvncvbn",
            "lastname": "werwerwe",
            "email": null,
            "phone": null,
            "whatsapp": null,
            "mobile": null,
            "address": null,
            "city": null,
            "state": null,
            "country": null,
            "zipcode": null,
            "timezone": null,
```
````

.

## List only SOME fields of only ONE specific Lead

<mark style="color:green;">`GET`</mark> `/leads/LEAD_ID`**\&query={lead{firstname,lastname,email,mobile}}**

Full endpoint: [https://sprinthub-api-master.sprinthub.app/leads/2065?i=instancia](https://sprinthub-api-master.sprinthub.app/leadsadvanced?i=instancia)**\&query={lead{firstname,lastname,email,mobile}}**

```json
{
    "data": {
        "lead": {
            "firstname": "BRKSUEDUTHSHbvncvbn",
            "lastname": "werwerwe",
            "email": null,
            "mobile": null
        }
    }
}

```

.

{% hint style="info" %}
Since this is GRAPHQL, you will only be able to retrieve specific fields from the Lead's fixed fields. To get the custom fields, only by retrieving everything with the parameter **\&allFields=1**
{% endhint %}
