Upload chatbot icon

POST/v1/chatbots/{chatbotId}/icon

Upload a custom icon for the chat bubble of a chatbot with the legacy v1 API using a multipart form.

Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.

Uploads an image that replaces the icon on the chat bubble of a chatbot. Call it when you brand the widget from your own tooling instead of the dashboard.

Request

POST /v1/chatbots/{chatbotId}/icon

This endpoint takes multipart/form-data, not JSON.

Path parameters:

Name Type Required Description
chatbotId string Yes The ID of the chatbot, starting with agt_.

Form fields:

Name Type Required Description
file file Yes The image to use. PNG, JPEG or WebP. A square image works best.

Uploading again replaces the previous icon. Use Delete chatbot icon to remove it.

Example request

curl -X POST https://api.askocto.co/v1/chatbots/agt_8f3k2m/icon \
  -H "Authorization: Bearer $OCTO_API_KEY" \
  -F "file=@./icon.png"
import { openAsBlob } from "node:fs"

const form = new FormData()
form.append("file", await openAsBlob("./icon.png"), "icon.png")

const response = await fetch("https://api.askocto.co/v1/chatbots/agt_8f3k2m/icon", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.OCTO_API_KEY}` },
  body: form,
})

console.log(await response.json())

Do not set the Content-Type header yourself. fetch adds it together with the multipart boundary.

Example response

A successful call returns 200 OK.

{
  "chatbotId": "agt_8f3k2m",
  "iconUrl": "https://cdn.askocto.co/assets/agt_8f3k2m/icon.png",
  "updatedAt": "2026-03-14T09:30:00Z"
}

Response fields

Name Type Description
chatbotId string The chatbot that now uses the icon.
iconUrl string Public URL of the stored icon.
updatedAt string ISO 8601 UTC time of the upload.

Errors

Status Code When
400 invalid_request The file field is missing or is not a PNG, JPEG or WebP image.
401 unauthorized The API key is missing, malformed or revoked.
404 not_found No chatbot with this ID exists in your workspace.
429 rate_limited Too many requests. Wait for the number of seconds in the Retry-After header.

In v2, styling lives on the agent, see Update agent styles.

Something unclear or missing? Tell us and we will fix the page.