LogoLogo
  • Introduction to the Ebbot Platform
  • Ebbot Platform
  • Bot basics
    • Scenarios
    • Entities
    • Triggers
    • Training center
  • Scenarios
    • Cards and syntax
      • File Input
      • Text card
      • Input
      • Buttons
      • Image
      • File
      • Carousel
      • Location
      • List
      • Contact Agent
      • Rating request
      • Custom component
      • CoBrowsing
    • Transition
    • Card properties
  • AI Insights
    • Setup and Configuration
    • Using the Insights Dashboard
  • EbbotGPT
    • Knowledge
      • Data source transformer
      • Source types
        • File
        • Website scrape
        • Docx file
        • TOPdesk API
        • Sitevision API
        • SharePoint API
          • Create app with Sites.FullControl.All permission in Azure
          • Ebbot SharePoint Postman Guide
        • Confluence API
    • Configurations
    • Persona
    • GPT Evaluation
    • Embedder models
    • EGPT models
  • Custom vocabulary
  • Tutorials
    • Create your first scenario
      • Select a trigger
      • Add bot responses
  • Data Object
  • Release notes
  • For developers
    • Ebbot SDK
    • Safe Exchange API / Vault
    • Subdomain manager
  • EbbotGPT API
  • Chatbot & Live chat
    • Install chat widget
    • Chats API
    • Chat widget API
    • Datasource API
    • Sales tracking for live chat
    • Webhook
      • Incoming webhooks
      • Outgoing webhooks
    • SMS API
      • Authentication
      • Send SMS
      • Errors
      • Encoding
    • Python components
    • Intent detection (NLP)
  • Product guides
    • Product data feeds
    • Install guide
    • Product guide events
      • Product guide user events
      • Received events
      • Send events
    • API & webhooks
    • GA4 integration
    • Klaviyo integration
  • Messenger marketing
    • Install popup
    • API & webhooks
  • Widget cookies & storage
  • For chat agents
    • Ebbot Chat
      • Settings modal
      • Queue
      • Topbar Stats
      • Menu
        • Power-Ups!
        • Quick Replies
  • INTEGRATIONS
    • Ebbot Live Chat in Zendesk
      • Setup guide
    • Active Directory - SAML
    • Configure SAML in Azure
Powered by GitBook
On this page
  • Fetching chats and transcripts
  • Step 1: Retrieve a List of Chats
  • Step 2: Retrieve Chat Transcript

Was this helpful?

  1. Chatbot & Live chat

Chats API

Create API key

Before using the API, you need to generate an API key. This can be done through the Ebbot application. Navigate to Settings > Integrations > API keys in the sidebar.

To generate a new key, click New in the top-right corner. Give your API key a name, click Save and the keys will be generated. Note that the full API key consists of both the public and the private key separated with a dot (.) and it will only be shown once, so take note while it is displayed.

When making calls to the Ebbot API, the full API key needs to be passed as a header namedx-api-key:

x-api-key: <public-key>.<secret-key>

Fetching chats and transcripts

Two API endpoints are available:

  • List Chats: Retrieves a paginated list of chats.

  • Fetch Transcript: Retrieves the full transcript for a specific chat ID.

Step 1: Retrieve a List of Chats

The URL in the following endpoints needs to be replaced with your actual Ebbot Platform URL. This is the same URL used to reach ebbot app. It can be one of the following URLs:

ebbot.eu v2.ebbot.app ca.ebbot.app

Endpoint

GET https://<ebbot_url>/api/chats/company_chats?page={page_number}&limit={limit}
  • page (optional): Page number for pagination (default is 1).

  • limit (optional): Number of chat records to retrieve per request (default is 15).

Example Request (curl)

curl --location 'https://ebbot.eu/api/chats/company_chats?page=1&limit=15' \
--header 'accept: application/json' \
--header 'x-api-key: <public-key>.<secret-key>'

Don't forget to replace <public-key>.<secret-key> with your actual API key.

Step 2: Retrieve Chat Transcript

Use chat IDs from the chat list response to retrieve detailed transcripts.

Endpoint

GET https://<ebbot-url>/api/chats/company_chats/{chatid}/transcript

Replace {chatid} with the desired chat ID.

Example Request (curl)

curl --location 'https://<ebbot-url>/api/chats/company_chats/1723454103.158.fa1419c9-2568-4ea5-9ddc-00b6c0fbd69e/transcript' \
--header 'accept: application/json' \
--header 'x-api-key: <public-key>.<secret-key>'

Example Transcript Response

{
  "success": true,
  "data": [
    {
      "date": "8/12/2024",
      "time": "9:15:08 AM",
      "sender": "bot",
      "text": "Hey"
    },
    {
      "date": "8/12/2024",
      "time": "9:15:08 AM",
      "sender": "bot",
      "text": "Hi there!"
    },
    {
      "date": "8/12/2024",
      "time": "9:15:12 AM",
      "sender": "user",
      "text": "I want to talk to human agent!"
    },
    {
      "date": "8/12/2024",
      "time": "9:15:16 AM",
      "sender": "bot",
      "text": "Sure! Let me connect you..."
    },
    {
      "date": "8/12/2024",
      "time": "9:15:19 AM",
      "sender": "system",
      "text": "The chat is now handled by an agent."
    },
    {
      "date": "8/12/2024",
      "time": "9:15:22 AM",
      "sender": "agent",
      "text": "Hello there!"
    }
  ],
  "request_id": "c61b72b1-d966-4873-ae06-7740fac5c00b"
}

Rate Limit

To ensure optimal performance and availability of the Chats API, a rate limit is enforced:

Limit: 20 requests per minute

Exceeding this limit will cause subsequent requests to time out. Please manage your request rates accordingly to avoid disruptions in service and implement handling mechanisms to pause and retry after the rate limit resets.

PreviousInstall chat widgetNextChat widget API

Last updated 2 months ago

Was this helpful?