---
title: "Upload a chat icon"
method: POST
path: "/upload-chatbot-icon/{chatbotId}"
tags: ["Chatbot Operations"]
---

# Upload a chat icon

`POST /upload-chatbot-icon/{chatbotId}`

## Request

- Base URL: `https://api.chat-data.com/api/v2`
- URL: `https://api.chat-data.com/api/v2/upload-chatbot-icon/{chatbotId}`
- Auth: HTTP bearer

This API endpoint allows you to update the chat icon of your chatbot. The image is resized to 100×100 pixels.

## Path parameters

- `chatbotId` string, required

## Response `200`

The request was processed. `status` is `success` when the icon was saved. If the image passed validation but could not be resized or saved, the response is still 200, with `status: error` and a `message`.

- object
  - `status` 'success' | 'error', required
  - `message` string: Why the icon could not be saved. Only present when `status` is `error`.

## Other responses

- `400`: The image is not a PNG, JPEG, GIF or WebP image, or it is not square.
- `401`: Authentication failed: the `Authorization` header is missing or not in the `Bearer <key>` format, the API key does not exist, its workspace is unavailable or has no owner, or the workspace's plan does not include API access. `message` says which.
- `403`: The API key cannot access the requested chatbot. A chatbot-scoped key used with another chatbot's ID gets `Access denied to this chatbot`. A workspace key gets `Chatbot <id> was not found in this API key's workspace. It may have been deleted or moved to another workspace.` when the chatbot does not exist or belongs to another workspace.
- `429`: The workspace sent more than 600 API requests in the last minute. Wait the number of seconds given in the `Retry-After` header (and in `message`) before retrying.
- `500`: No `image` file was sent, the image is larger than 1 MB, or the file cannot be read as an image (corrupt or truncated). The response is not JSON.

---

[API](https://skmtc.dev/chat-data/apis/chat-data-api-schema-guide.md) · [All operations](https://skmtc.dev/chat-data/apis/chat-data-api-schema-guide/llms.txt) · [OpenAPI document](https://skmtc.dev/chat-data/apis/chat-data-api-schema-guide/revisions/72871007f7f0?raw)
