API Endpoint

The API endpoint for obtaining a streaming response is:

https://backend.chatfly.co/api/scraping/question-answer/{bot_id}

Request Body

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

{
    "bot_id": "your_bot_id",
    "question": "string",
    "answer": "string"
}
  • bot_id (string): ID of your bot.
  • question (string): Question.
  • answer (string): Answer.

Example Request

Explore here for example commands to import a single Q-A pair and here for bulk import using the ChatFly API.

Response Body

The streaming response is as follows:

{
    "id": "string",
    "bot_id": "string",
    "question": "string",
    "answer": "string",
    "num_token": "int",
    "created_at": "datetime"
}
  • id (string): ID of each question-answer pair.
  • bot_id (string): ID of your bot.
  • question (string): Question
  • answer (string): Answer
  • num_token (int): Number of tokens consumed