Delete chatbot icon

DELETE/v1/chatbots/{chatbotId}/icon

Remove the custom icon of a chatbot with the legacy v1 API so the chat bubble goes back to the default icon.

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

Removes the custom icon of a chatbot. Call it when you want the chat bubble to show the default icon again, for example after a rebrand that retires the old artwork.

Request

DELETE /v1/chatbots/{chatbotId}/icon

Path parameters:

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

The request has no body. Send the Authorization header with your API key as described in Authentication.

Note: This is a legacy v1 endpoint. In v2 the icon is part of the agent styles, see Update agent styles.

Example request

curl -X DELETE https://api.askocto.co/v1/chatbots/agt_8f3k2m/icon \
  -H "Authorization: Bearer $OCTO_API_KEY"
const response = await fetch("https://api.askocto.co/v1/chatbots/agt_8f3k2m/icon", {
  method: "DELETE",
  headers: { Authorization: `Bearer ${process.env.OCTO_API_KEY}` },
})

if (!response.ok) {
  throw new Error(`Request failed with status ${response.status}`)
}

console.log(await response.json())

Example response

A successful call returns 200 OK.

{
  "chatbotId": "agt_8f3k2m",
  "deleted": true
}

Response fields

Name Type Description
chatbotId string The chatbot the icon belonged to.
deleted boolean true once the icon is removed.

If the chatbot has no custom icon, the call still succeeds and returns the same response. To set a new icon, use Upload chatbot icon.

Errors

Status Code When
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.

Error bodies carry a code and a message, for example { "error": "not_found", "message": "Chatbot not found." }. See the v1 overview for the shared conventions.

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