Chatzuri Logo
  • Affiliates
  • Pricing
  • API
  • Guides
  • Blog
  • Affiliates
  • Pricing
  • API
  • Guides
  • Blog

API Documentation

  • Getting Started

    Getting Setup
  • Teams

    Teams Overview
  • Create a Team
  • Get Teams
  • Update a Team
  • Delete a Team
  • Agents

    Create an Agent
  • Message an Agent
  • Update an Agent
  • Delete an Agent
  • Get Agents
  • Stream Messages
  • Update Agent Settings
  • Upload Agent Icon
  • Delete Agent Icon
  • Upload Agent Profile Picture
  • Delete Agent Profile Picture
  • Data

    Get Leads
  • Get Conversations
  • Integrations

    Webhooks API
  1. Home
  2. API Docs
  3. Get Leads

Get Leads

This guide assists you with gathering leads.

Get Leads API

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

Endpoint

GET:https://www.chatzuri.com/api/v1/get-leads

Request Headers

The API request must include the following headers.

  • Authorization:Bearer <Your-Secret-Key>
    - The secret key for authenticating the API request.
  • Content-Type:application/json
    - The content type of the request payload.

Request Parameters

The request should include the following query parameters:

Required Parameters

  • agentId- (string) The ID of the agent for which you want to retrieve leads.

Optional Parameters

  • startDate- (string) Start date in 'YYYY-MM-DD' format for filtering leads.
  • endDate- (string) End date in 'YYYY-MM-DD' format for filtering leads.
  • page- (string) Page number for pagination.
  • size- (string) Number of results per page.

Example Request

// streamer.js const axios = require('axios'); const { Readable } = require('stream'); const apiKey = '<Your-Secret-Key>'; const chatId = '<Your Agent ID>'; const apiUrl = 'https://www.chatzuri.com/api/v1/chat'; const messages = [ { content: '<Your query here>', role: 'user' } ]; const authorizationHeader = `Bearer ${apiKey}`; async function readChatbotReply() { try { const response = await axios.post(apiUrl, { messages, chatId, stream: true, temperature: 0 }, { headers: { Authorization: authorizationHeader, 'Content-Type': 'application/json' }, responseType: 'stream' }); const readable = new Readable({ read() {} }); response.data.on('data', (chunk) => { readable.push(chunk); }); response.data.on('end', () => { readable.push(null); }); const decoder = new TextDecoder(); let done = false; readable.on('data', (chunk) => { const chunkValue = decoder.decode(chunk); process.stdout.write(chunkValue); }); readable.on('end', () => { done = true; }); } catch (error) { console.log('Error:', error.message); } } readChatbotReply();

Response

The API response will be a JSON object with the following structure:

{ "data": [ { "id": 0, "created_at": "string", "chatbot_owner_user_id": "string", "chatbot_id": "string", "phone": "string", "email": "string", "name": "string" } ] }

Response codes:

202

Returns an array of leads that match the provided filters

400

If the start/end dates provided are invalid

401

If the API request is unauthorized

404

If the agentId provided is invalid

500

If there is an internal server error

By making use of the Get Leads API endpoint, you can retrieve and analyze potential leads generated through the agent interactions.

Next:: Get Conversations
FacebookInstagramGitHubBehancePinterestTwitterDribbble
Chatzuri

AI-powered agents are transforming customer interactions by providing instant, intelligent responses around the clock. They help businesses reduce operational costs, improve response times, and scale support without compromising quality. These agents understand natural language, learn from conversations, and integrate with existing systems to offer personalized experiences that enhance customer satisfaction and loyalty.

Chatzuri

AI-powered agents are transforming customer interactions by providing instant, intelligent responses around the clock. They help businesses reduce operational costs, improve response times, and scale support without compromising quality. These agents understand natural language, learn from conversations, and integrate with existing systems to offer personalized experiences that enhance customer satisfaction and loyalty.

Product

  • Pricing
  • Security
  • Affiliates

Resources

  • API
  • Guides
  • Blog
  • Help

Company

  • About us
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA

About

  • Teams
  • Singapore, Nairobi

© 2026 Chatzuri. All rights reserved.

Made with ❤️ for businesses worldwide

Terms of ServicePrivacy PolicyCookie PolicyTevinly