API Endpoint

The API endpoint for obtaining a streaming response is:

https://backend.chatfly.co/api/scraping/file

Request Body

To import a file, send a POST request to the API endpoint with a JSON request. Here’s an example JSON request:

  • bot_id (string): ID of your bot.
  • file (binary): The uploaded file.

Example Request

Explore here for example commands to import a file using the ChatFly API.

Response Body

The response is as follows:

{
    "filename": "file_name.pdf",
    "num_token": 2669,
    "s3_location_file": "path-to-s3-location"
  }
  • filename (string): File name.
  • progress (float): Current progress (from 0 to 1).
  • num_token (int): Number token of the current page.