# 1. Get Leads

## &#x20;Get leads

```
GET /api/v1/backend/chatbot/{bot_uid}/leads
```

The Get Leads API endpoint allows you to retrieve leads generated from a chatbot's conversations. By using this endpoint, you can obtain names, phone numbers, emails, and remarks from users who interact with your chatbots.

### Path parameters

**bot\_uid** string Required\
The unique ID of the chatbot for which you want to retrieve leads.

### Query parameters

**start\_date** string Optional\
Represents the start date of the date range for fetching conversations. the date should be in "year-month-day" format (e.g. 2023-11-19).\
**end\_date** string Optional\
Represents the end date of the date range for fetching conversations. the date should be in "year-month-day" format (e.g. 2023-11-19).\
**page** int Optional\
Specifies the page number of the results for pagination. default is 1.\
**page\_size** int Optional\
Indicates the number of results per page, which is also used for pagination. default is 10.

### Returns

```
{
  "code": 0,
  "data": {
    "leads": [
      {
        "bot_uid": "86a2eb21-9711-4950-8ffd-50c04317956c",
        "conversation_uid": "a3ccacb5-c826-471e-acc4-97b8914fd40f",
        "created_at": "2023-11-13T20:02:52+00:00",
        "email": "example@chatof.ai",
        "name": "example",
        "phone": "123456",
        "remark": "remark"
      }
    ],
    "page": 1,
    "page_size": 10,
    "total": 5
  },
  "msg": "Success.",
  "request_id": "892bf29e-07e5-4ac1-8120-040c8268cb5b"
}
```

#### Data

**leads** list\
a list of Leads.\
**page** number\
current page.\
**page\_size** number\
current page size.\
**total** number\
The total number of leads for this chatbot.

#### Lead

**bot\_uid** string\
The unique ID of the chatbot.\
**conversation\_uid** string\
The conversation ID from which this lead originated.\
**created\_at** string\
The time when the lead was created.\
**email** string\
**name** string\
**phone** string\
**remark** string


---

# 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.chatof.ai/api-reference/endpoints/1.-get-leads.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.
