Docs
Get Leads

Get Leads

Learn how to get leads from your chatbot

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

ParameterTypeRequiredDescription
bot_uidstringYesThe unique ID of the chatbot for which you want to retrieve leads.

Query parameters

ParameterTypeRequiredDescription
bot_uidstringYesThe unique ID of the chatbot for which you want to retrieve leads.
start_datestringOptionalRepresents 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_datestringOptionalRepresents the end date of the date range for fetching conversations. The date should be in "year-month-day" format (e.g. 2023-11-19).
pageintOptionalSpecifies the page number of the results for pagination. Default is 1.
page_sizeintOptionalIndicates 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

FieldTypeDescription
leadslistA list of Leads.
pagenumberCurrent page.
page_sizenumberCurrent page size.
totalnumberThe total number of leads for this chatbot.

Lead

FieldTypeDescription
bot_uidstringThe unique ID of the chatbot.
conversation_uidstringThe conversation ID from which this lead originated.
created_atstringThe time when the lead was created.
emailstring
namestring
phonestring
remarkstring