Chatbot Analytics

Get customers

Get the customers (leads) collected by a chatbot, newest first. Results are paginated.

get/get-customers/{chatbotId}

Request

  • Base URL: https://api.chat-data.com/api/v2
  • URL: https://api.chat-data.com/api/v2/get-customers/{chatbotId}
  • Auth: HTTP bearer

Path parameters

chatbotIdstring required

The unique identifier allocated to the chatbot.

Query parameters

startTimestampnumber

Start of the time range (inclusive) for when customers were collected, in milliseconds since the Unix epoch.

endTimestampnumber

End of the time range (exclusive), in milliseconds since the Unix epoch.

startnumber

The start position of the results, used for pagination.

sizenumber

The maximum number of results returned after the start position, used for pagination. A negative value returns all remaining results; 0 returns a 400 error.

sourcestring[]

Filter customers by the source they were acquired from. Repeat the parameter to match several sources.

leadIdstring

Filter by the lead's UUID (leadId).

Example:8d0c2b6e-4f1a-4b7c-9e3d-2a5f6b7c8d9e
psidstring

Filter by the page-scoped user ID (Messenger).

Example:6543210987654321
ig_usernamestring

Filter by the Instagram username.

Example:jane.doe
usernamestring

Filter by the Slack or Telegram username.

Example:janedoe
namestring

Filter by the customer name (exact match).

Example:Jane Doe
emailstring

Filter by the customer email address (exact match).

Example:jane@chat-data.com
phonestring

Filter by the customer phone number (exact match of the stored value).

Example:+14155550123

Response

Successful response.

status'success' required
totalnumber required

Total number of matching customers, ignoring pagination.

Example response

{
  "customers": [
    {
      "leadId": "8d0c2b6e-4f1a-4b7c-9e3d-2a5f6b7c8d9e",
      "name": "Jane Doe",
      "email": "jane@chat-data.com",
      "source": "widget",
      "phone": "+14155550123",
      "ipAddress": "203.0.113.42",
      "userCountry": "US",
      "createdAt": 1791970200000
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.