Documentation

Upload Chatbot Icon

Update the icon of your chatbot.

Upload Chatbot Icon API Guide

The Upload Chatbot Icon API endpoint allows you to update the icon of a specific chatbot.

Endpoint

POST https://www.chatbase.co/api/v1/upload-chatbot-icon

Request Headers

The API request must include the following headers:

  • Authorization: Bearer <Your-Secret-Key> - The secret key for authenticating the API request.
  • Content-Type: multipart/form-data - The content type for the file upload.

Request Body

The request body should be a multipart form containing the following parameters:

  • chatbotId (string, required): The unique identifier for the chatbot you want to update the icon for (found in the chatbot settings).
  • chatbotIconFile (file, required): The icon file to be uploaded. It must be a square image (length = width) and its size must be under 1MB.

Example Request

curl --request POST \
     --url https://www.chatbase.co/api/v1/upload-chatbot-icon \
     --header 'accept: application/json' \
     --header 'content-type: multipart/form-data' \
     --form 'chatbotId=[Your Chatbot ID]'
import requests

url = "https://www.chatbase.co/api/v1/upload-chatbot-icon"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chatbotId\"\r\n\r\n[Your Chatbot ID]\r\n-----011000010111000001101001--\r\n\r\n"
headers = {
    "accept": "application/json",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
}

response = requests.post(url, data=payload, headers=headers)

print(response.text)
const form = new FormData();
form.append('chatbotId', '[Your Chatbot ID]');

const options = {method: 'POST', headers: {accept: 'application/json'}};

options.body = form;

fetch('https://www.chatbase.co/api/v1/upload-chatbot-icon', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
POST /api/v1/upload-chatbot-icon HTTP/1.1
Accept: application/json
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: www.chatbase.co
Content-Length: 137

-----011000010111000001101001
Content-Disposition: form-data; name="chatbotId"

[Your Chatbot ID]
-----011000010111000001101001--


Response

  • 200: Returns a confirmation message indicating the successful upload and update of the chatbot icon.
  • 400: If the chatbot ID is missing.
  • 401: If the request is unauthorized.
  • 404: If the chatbot ID is invalid.
  • 500: If there is an internal server error.

Example Response

{
  "message": "string"
}

The Upload Chatbot Icon API endpoint provides a way to update the icon of a chatbot. Upon successful upload and update, a confirmation message is returned in the response.