Robofy API
HomeChangelog
HomeChangelog
Visit Website
Sign In
Create an account
  1. Leads
  • Start Guide
    • Overview
    • Architecture
    • Authentication
    • Changelog
  • Robofy API
    • Chat
      • Generate Client Token (Handshake)
      • Send Message (Streaming)
      • Send Message (Non Streaming)
      • Send WhatsApp Message
    • Chatbot / Agent
      • List Agents
      • Create Agent
      • Retrieve Agent
      • Update Agent
      • Delete Agent
      • Delink Asset
      • List Linked Assets
      • Delete Widget Tab
    • Account
      • Retrieve Account Details
      • Update Account Details
      • Retrieve Account Limit
    • Prompt & Persona
      • Update System Prompt
      • Retrieve Agent Settings
      • Update Persona
      • Retrieve Persona
    • Inbox
      • List Sessions
      • List Session Messages
    • Project
      • Create Project
      • List Projects
      • Update Project
      • Retreive Project
    • Leads
      • List Leads
        GET
    • Content
      • Add Website
      • Get Crawl Status
      • Add Text Content
      • Add File
    • Stats
      • Stats
    • License
      • Create License
      • List License
      • Update License
      • Retrieve License
      • Delete License
      • Update License Limit
    • Partner
      • Onboard
    • Schemas
      • Account
      • AccountDetailDto
      • Address
      • AgentCredentialInsertResponseDto
      • AgentCredentialRequestDto
      • AgentCredentialResponseDto
      • AgentDataPoint
      • AgentLeadCapture
      • AgentLeadReportDto
      • AgentLinkageDto
      • AgentMcpServerDto
      • AgentMcpServerInsertResponseDto
      • AgentMcpServerRequestDto
      • AgentMcpServerUpdateRequestDto
      • AgentPromptVersionDto
      • AgentSessionListDto
      • AgentSessionListItemDto
      • AgentStatsDto
      • AgentThemeDto
      • AgentThemeListDto
      • AgentToolLinkageInsertResponseDto
      • AgentToolLinkageRequestDto
      • AgentWhatappIntrgrationResponse
      • AgentWhatsAppLinkageDto
      • Button
      • CarouselCard
      • CategoryStats
      • ChatBotDetailsDto
      • ChatBotDetailsRequest
      • ChatBotDetailsUpdateRequest
      • ChatbotAISettingsDto
      • ChatbotAISettingsRequest
      • ChatbotAdvanceSettingsDto
      • ChatbotAdvanceSettingsRequest
      • ChatbotAppearanceSettingsDto
      • ChatbotAppearanceSettingsRequest
      • ChatbotAssetDelinkDto
      • ChatbotAssetLinkageDataDto
      • ChatbotAssetLinkageDelinkRequest
      • ChatbotAssetLinkageDetailsDto
      • ChatbotAssetLinkageDto
      • ChatbotAssetLinkageRequest
      • ChatbotTextLinkageRequest
      • ClientData
      • CommonResponse
      • Component
      • Contact
      • ContactName
      • CrawlStatusDto
      • CrawlWebsiteRequest
      • CreateOrUpdateProjectRequest
      • CreatePhoneNumberRequest
      • CreateTemplateRequest
      • CreateWebhookConfigRequest
      • DeLinkWhatsAppRequest
      • Email
      • Error
      • ErrorResponse
      • Example
      • FailureStats
      • FailureStatsDataPoint
      • FormField
      • GoogleSheetDto
      • GoogleSheetIntegrationRequest
      • InboxChatDto
      • InboxDto
      • InboxMessage
      • InboxSession
      • IntelligentMetricsDto
      • Interactive
      • InteractiveAction
      • InteractiveBody
      • InteractiveButton
      • InteractiveFooter
      • InteractiveHeader
      • InteractiveMedia
      • InteractiveProductItem
      • InteractiveProductSection
      • InteractiveReply
      • InteractiveRow
      • InteractiveSection
      • LeadCaptureForm
      • LeadData
      • LeadDataField
      • LeadFormData
      • LeadReport
      • LicenseCreateRequest
      • LicenseDto
      • LicenseLimitRequest
      • LicenseUpdateRequest
      • LimitedTimeOffer
      • LinkWhatsAppRequest
      • LinkedCredentialDto
      • LinkedMcpServerDto
      • Location
      • Media
      • MessageMetaData
      • MessageRequest
      • MessageResponse
      • MessageStats
      • MessageStatsDataPoint
      • MessageTemplate
      • NamedParameter
      • OrgLimitDto
      • Organization
      • PaginatedWebhookLogsResponse
      • Part
      • PartnerClientSession
      • PartnerClientSessionDto
      • Phone
      • PhoneNumberRequest
      • PhoneVerifyCodeRequest
      • PhoneVerifyRequest
      • PlatformStats
      • ProjectDetailDto
      • ProjectWABADetail
      • Reaction
      • ReadTypingIndicatorRequest
      • RecentInsightDto
      • Response
      • SessionInsightItemDto
      • SessionInsightsDto
      • SessionMetaDto
      • SessionMetricsDto
      • SessionSummaryDetailDto
      • StartUrl
      • SubcribedAppsRequest
      • SupportedApp
      • TemplateAction
      • TemplateButtons
      • TemplateCarousel
      • TemplateComponent
      • TemplateCurrency
      • TemplateDateTime
      • TemplateLimitedTimeOffer
      • TemplateMedia
      • TemplateParameter
      • TemplateProductItem
      • TemplateSection
      • TemplateTapTargetConfiguration
      • Text
      • ThemeMetaDto
      • TypingIndicator
      • UpdateOnboardStatusRequest
      • UpdateOnboardStatusResponseDto
      • UploadMedia
      • Url
      • WABADetail
      • WABADto
      • Webhook
      • WebhookConfigDto
      • WebhookConfiguration
      • WebhookLogDto
      • WebsiteDto
      • WhatsAppBusinessApiData
      • WhatsAppBusinessProfile
      • WidgetIntegration
  1. Leads

List Leads

GET
/v1/ai-agent/leads/{projectId}/{chatbotId}
This API retrieves a paginated list of leads captured by an AI agent.

Endpoint#

GET /v1/ai-agent/leads/{projectId}/{chatbotId}

Path Parameters#

ParameterTypeRequiredDescription
projectIdintegerYesUnique identifier of the project.
chatbotIdstringYesUnique identifier of the chatbot.

Query Parameters#

ParameterTypeRequiredDescription
nextPageTokenstringNoToken used to retrieve the next page of lead records.
sessionIdstringNoUnique identifier of a session. If provided, the API returns leads captured for the given session only.

Request Body#

No request body is required.

Success Response#

Status Code#

200 OK

Response Body#

{
  "message": "Leads retrieved successfully.",
  "data": {
    "report": {
      "columns": [
        "id",
        "created_at",
        "source",
        "page_url",
        "ip_address",
        "lead_data"
      ],
      "rows": [
        {
          "id": "lead_12345",
          "created_at": "2025-01-15 10:30:00",
          "source": "chatbot",
          "page_url": "https://example.com/contact",
          "ip_address": "192.168.1.1",
          "lead_data": [
            {
              "field_name": "name",
              "field_type": "text",
              "field_value": "John Doe"
            },
            {
              "field_name": "email",
              "field_type": "email",
              "field_value": "john@example.com"
            }
          ]
        }
      ],
      "next_page_token": "eyJwYWdlIjoyfQ=="
    }
  }
}

Response Fields#

FieldTypeDescription
messagestringResponse status message.
dataobjectResponse data object.
data.reportobjectLead report object containing columns, rows, and pagination details.
data.report.columnsarray of stringsList of column names included in the lead report.
data.report.rowsarray of objectsList of lead records captured by the AI agent.
data.report.rows[].idstringUnique identifier of the lead record.
data.report.rows[].created_atstringDate and time when the lead was captured.
data.report.rows[].sourcestringSource from which the lead was captured.
data.report.rows[].page_urlstringPage URL where the lead was captured.
data.report.rows[].ip_addressstringIP address of the user who submitted the lead.
data.report.rows[].lead_dataarray of objectsList of captured lead form fields and their values.
data.report.rows[].lead_data[].field_namestringName of the captured form field.
data.report.rows[].lead_data[].field_typestringType of the captured form field.
data.report.rows[].lead_data[].field_valuestringValue submitted for the captured form field.
data.report.next_page_tokenstringToken used to fetch the next page of results. If no more records are available, this may be empty or null.

Example Request#

Example Request With Pagination#

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Query Params

Responses

🟢200
application/json
OK
Body

🟠400
🟠401
🟠403
🟠404
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://agents.robofy.ai/v1/ai-agent/leads//?nextPageToken=undefined&sessionId=undefined' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "message": "string",
    "data": {
        "report": {
            "columns": [
                "string"
            ],
            "rows": [
                {
                    "id": "string",
                    "created_at": "string",
                    "source": "string",
                    "page_url": "string",
                    "ip_address": "string",
                    "lead_data": [
                        {
                            "field_name": "string",
                            "field_type": "string",
                            "field_value": "string"
                        }
                    ]
                }
            ]
        },
        "next_page_token": "string"
    }
}
Modified at 2026-05-19 10:42:07
Previous
Retreive Project
Next
Add Website
Built with