> 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=instance](https://sprinthub-api-master.sprinthub.app/leadsadvanced?i=instancia)

i = name of your instance

**Body (below example 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=instance](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=instance](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=instance](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" %}
Because this is GRAPHQL, you will only be able to fetch specific fields from the Lead's fixed fields. To fetch customized fields, only by bringing everything with the parameter **\&allFields=1**
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/topics/api/api-api-call-to-list-leads-and-lead-fields.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
