API - Call to list the instance's leads by searching for a specific field
Introduction
Full endpoint: https://sprinthub-api-master.sprinthub.app/leadsadvanced?i=instancia
i = name of your instance
Request type: POST
JSON Example
Body
{
"query": "{leads{id,fullname,email,whatsapp,mobile}}",
"search": "teste@gmail.com"
}Request Body
The request body will be in JSON format and must include two main fields: query and search.
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,whatsappandmobile.search: This field allows you to filter 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
Let's now see how to make this API call using Postman:
Conclusion
In this article, we saw how to make an API call to obtain leads using SprintHub. We used a specific endpoint and a JSON request body to list leads and retrieve specific information. Try different search criteria to meet your specific needs.
Last updated
Was this helpful?