Endpoint
Request Headers
The API request must include the following header:Authorization: Bearer <Your-Secret-Key>
- The secret key for authenticating the API request.
Request Body Parameters
-
chatbotId
(string, required): The ID of the chatbot for which you want to retrieve leads. -
startDate
(string): Represents the start date of the date range for fetching conversations. The date should be in “Year-Month-Day” format (e.g., 2023-07-10, not 2023-7-10). -
endDate
(string): Represents the end date of the date range for fetching conversations. The date should be in “Year-Month-Day” format (e.g., 2023-07-13, not 2023-7-13). -
page
(string): Specifies the page number of the results for pagination. -
size
(string): Indicates the number of results per page, which is also used for pagination.
Example Requests
json
Responses
- 200: Returns an array
collectedCustomers[]
containing conversations that match the provided filters. These conversations represent leads generated by the chatbot. - 400: If the start/end dates provided are invalid.
- 401: If the API request is unauthorized.
- 404: If the provided chatbot ID is invalid and does not correspond to any existing chatbot.
- 500: If there is an internal server error while processing the request.
Example Response
json