Upload Chat Widget icon
curl --request POST \
--url https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-icon \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file='@example-file'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-icon"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-icon', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "File uploaded successfully",
"response": {
"fileUrl": "https://your-storage.blob.core.windows.net/..."
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Unsupported image type. Allowed: JPEG, PNG, GIF, BMP, WebP, TIFF, SVG."
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}Chat SDK API
Upload Chat Widget Icon
Upload a custom launcher icon for the Chat Widget
POST
/
v1
/
agents
/
{botId}
/
chat-sdk-icon
Upload Chat Widget icon
curl --request POST \
--url https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-icon \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file='@example-file'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-icon"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-icon', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "File uploaded successfully",
"response": {
"fileUrl": "https://your-storage.blob.core.windows.net/..."
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Unsupported image type. Allowed: JPEG, PNG, GIF, BMP, WebP, TIFF, SVG."
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}What it does: Upload a custom image to replace the Chat Widget’s floating launcher button icon. The uploaded file is stored and applied to the widget immediately after upload.
Requires the
ORG_ADMIN or DEVELOPER role.
Required Permission
agents — ORG_ADMIN or DEVELOPER role
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
botId | string | Yes | Unique agent identifier. |
Request
Send the request asmultipart/form-data with a single field named file containing the image. When using cURL with the -F flag, the Content-Type header is set automatically.
Accepted formats: JPEG, PNG, GIF, BMP, WebP, TIFF, SVG
Minimum working example
curl -X POST "https://api.inya.ai/platform/v1/agents/fb79920229d144608ebf665a10e50275/chat-sdk-icon" \
-H "x-api-key: <your_api_key>" \
-F "file=@/path/to/your/icon.png"
Response
Success (200)
{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "File uploaded successfully",
"response": {
"fileUrl": "https://your-storage.blob.core.windows.net/..."
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
fileUrl | string | URL of the uploaded icon file. Use this URL in your chat widget configuration if needed. |
Errors
| Status | Condition | Message |
|---|---|---|
400 | Unsupported file type | Unsupported image type. Allowed: JPEG, PNG, GIF, BMP, WebP, TIFF, SVG. |
403 | QA role attempted the upload | QA role does not have permission to update agents. |
404 | Agent not found | Agent not found |
Use Cases
- Branding the chat widget launcher with your company logo
- Using a different icon per agent to reflect different product lines
- Updating the icon after a brand refresh
For best results, use a square image of at least 60×60 pixels. PNG or WebP with a transparent background renders cleanly on any launcher button color.
Save the
requestId from every response. You will need it if you contact Gnani support to trace a specific request.Authorizations
API key with 'agents' permission
Path Parameters
Unique identifier of the agent
Body
multipart/form-data
Icon image file (JPEG, PNG, GIF, BMP, WebP, TIFF, SVG)
Was this page helpful?