# API - Call to list the instance's leads looking for a specific field

## Introduction

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

i = name of your instance

Request type: <mark style="color:red;">**POST**</mark>

### JSON example

**Body**

```
{
    "query": "{leads{id,fullname,email,whatsapp,mobile}}",
    "search": "teste@gmail.com"
}
```

#### Request Body

The request body will be JSON and must include two main fields: `query` and `search`.

1. **query**: This field specifies the information we want to retrieve about the leads. In the example below, we are interested in obtaining the fields `id`, `fullname`, `email`, `whatsapp` and `mobile`.
2. **search**: This field allows filtering the results based on a search criterion. In the example, we are looking for a lead with the email `teste@gmail.com`.

### API call example

Now let's see how to make this API call using Postman:

```
{
    "data": {
        "leads": [
            {
                "id": 2059,
                "fullname": "Teste 2",
                "email": "teste@gmail.com",
                "whatsapp": null,
                "mobile": null
            }
        ]
    }
}
```

{% hint style="info" %}
If Search is not specified, the JSON will show all fields from the query for some leads.
{% endhint %}

### Conclusion

In this article, we saw how to make an API call to retrieve leads using SprintHub. We used a specific endpoint and a JSON request body to list leads and fetch specific information. Try different search criteria to meet your specific needs.


---

# Agent Instructions: 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:

```
GET https://docs.sprinthub.com/en/topics/api/api-api-call-to-list-leads-and-lead-fields/api-call-to-list-the-instances-leads-by-searching-for-a-specific-field.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
