Skip to main content

Edit Chatbot Settings

The AI Agent API enables you to update the configuration of a specified chatbot by sending a POST request to the /chat/Chatbot/Edit endpoint.

Endpoint

Request URL: https://usapi.hottask.com/chat/Chatbot/Edit

Method: POST

Request Headers

The API request must include the following headers:

  • Authorization: <Your-Secret-Key> - string, required - The secret key for authenticating the API request
  • Content-Type: application/json - string, required - The content type of the request payload (must be application/json)

Request Body

The request body should contain the following parameters:

{
// string, required - The unique identifier (ID) of the chatbot
"serialNumber": "3254a9d0424c4806b9ea3d0763ccfxxx",
// string, optional - New name for the chatbot
"Name": "NewName",
// string, optional - AI model ID, you can call the Get Model List interface to obtain
"Model": "2",
// string, optional - System prompt for the chatbot
"SystemMessage": "new Prompt",
// integer, optional - Temperature setting for responses
"Temperature": 0,
// string, optional - Time zone setting
"TimeZone": "Asia/Shanghai",
// string, optional - Text to append to answers
"AnswerSuffix": "Asia/Shanghai",
// string, optional - File ID for profile picture
"ChatProfilePicture": "34327",
// string, optional - File ID for bubble icon
"ChatIcon": "34327",
// integer, optional - Alignment of chat bubble
"ChatBubbleAlign": 0,
// string, optional - Color of chat bubble (RGB format)
"ChatBubbleColor": "rgb(37,99,235)",
// boolean, optional - Whether to show popup only once
"ChatbotPopupOnce": true,
// string, optional - Privacy policy description
"ChatbotPrivacyPolicyDescription": "",
// string, optional - Privacy policy name
"ChatbotPrivacyPolicyName": "privacy policy",
// string, optional - Privacy policy URL
"ChatbotPrivacyPolicyUrl": "",
// boolean, optional - Enable push-to-talk feature
"EnablePushToTalk": false,
// boolean, optional - Enable image upload feature
"EnableUploadImage": false,
// string, optional - Facebook page URL
"FacebookUrl": "",
// string, optional - Instagram profile URL
"InstagramUrl": "",
// boolean, optional - Clear chat history on browser close
"RemoveChatLogOnBrowserClose": false,
// string, optional - Suggested messages
"SuggestedMessage": "",
// string, optional - Email for human handoff
"TalkToHumanEmail": "",
// string, optional - Message when transferring to human
"TalkToHumanResponseMessage": "",
// string, optional - Placeholder text for input field
"UserInputPlaceholder": "",
// string, optional - Color of user messages (RGB format)
"UserMessageColor": "rgb(59, 129, 246)",
// string, optional - Initial greeting message
"WelcomeMessage": "Hi this is your AI assistant! What can I help you with?",
// string, optional - WhatsApp contact URL
"WhatsappUrl": "",
// boolean, optional - Enable domain verification
"VerifyDomain": false,
// string, optional - Allowed domains for embedding
"Domains": "",
// integer, optional - Maximum messages allowed
"RateLimitCount": 20,
// string, optional - Rate limit exceeded message
"RateLimitMessage": "Too many messages in a row",
// integer, optional - Rate limit duration in seconds
"RateLimitTime": 240,
// string, optional - Custom domain for embedding
"CustomDomain": "",
// string, optional - Email for daily chat logs
"EmailForDailyChatLogs": "",
// string, optional - Email for daily leads
"EmailForDailyLeads": "",
// string, optional - Language for AI responses (use full language name, e.g., 'English', 'Spanish', 'French')
"AIResponseLanguage": ""
}
  • serialNumber - string, required - The unique identifier (ID) of the chatbot
  • Name - string, optional - New name for the chatbot
  • Model - string, optional - AI model ID, you can call the Get Model List interface to obtain
  • SystemMessage - string, optional - System prompt for the chatbot
  • Temperature - integer, optional - Temperature setting for responses
  • TimeZone - string, optional - Time zone setting
  • AnswerSuffix - string, optional - Text to append to answers
  • ChatProfilePicture - string, optional - File ID for profile picture
  • ChatIcon - string, optional - File ID for bubble icon
  • ChatBubbleAlign - integer, optional - Alignment of chat bubble
  • ChatBubbleColor - string, optional - Color of chat bubble (RGB format)
  • ChatbotPopupOnce - boolean, optional - Whether to show popup only once
  • ChatbotPrivacyPolicyDescription - string, optional - Privacy policy description
  • ChatbotPrivacyPolicyName - string, optional - Privacy policy name
  • ChatbotPrivacyPolicyUrl - string, optional - Privacy policy URL
  • EnablePushToTalk - boolean, optional - Enable push-to-talk feature
  • EnableUploadImage - boolean, optional - Enable image upload feature
  • FacebookUrl - string, optional - Facebook page URL
  • InstagramUrl - string, optional - Instagram profile URL
  • RemoveChatLogOnBrowserClose - boolean, optional - Clear chat history on browser close
  • SuggestedMessage - string, optional - Suggested messages
  • TalkToHumanEmail - string, optional - Email for human handoff
  • TalkToHumanResponseMessage - string, optional - Message when transferring to human
  • UserInputPlaceholder - string, optional - Placeholder text for input field
  • UserMessageColor - string, optional - Color of user messages (RGB format)
  • WelcomeMessage - string, optional - Initial greeting message
  • WhatsappUrl - string, optional - WhatsApp contact URL
  • VerifyDomain - boolean, optional - Enable domain verification
  • Domains - string, optional - Allowed domains for embedding
  • RateLimitCount - integer, optional - Maximum messages allowed
  • RateLimitMessage - string, optional - Rate limit exceeded message
  • RateLimitTime - integer, optional - Rate limit duration in seconds
  • CustomDomain - string, optional - Custom domain for embedding
  • EmailForDailyChatLogs - string, optional - Email for daily chat logs
  • EmailForDailyLeads - string, optional - Email for daily leads
  • AIResponseLanguage - string, optional - Language for AI responses (use full language name, e.g., 'English', 'Spanish', 'French')

Example Request

JavaScript (Fetch API)

const res = await fetch('https://usapi.hottask.com/chat/Chatbot/Edit', {
method: 'POST',
headers: {
"Authorization": "<Your-Secret-Key>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"serialNumber": "3254a9d0424c4806b9ea3d0763ccfxxx",
"Name": "NewName"
})
});

const data = await res.json();
console.log(data);

Python (Requests Library)

import requests
import json

url = 'https://usapi.hottask.com/chat/Chatbot/Edit'
headers = {
"Authorization": "<Your-Secret-Key>",
"Content-Type": "application/json"
}
data = {
"serialNumber": "3254a9d0424c4806b9ea3d0763ccfxxx",
"Name": "NewName"
}

response = requests.post(url, headers=headers, json=data)
data = response.json()
print(data)

cURL

curl 'https://usapi.hottask.com/chat/Chatbot/Edit' \
-X POST \
-H 'Authorization: <Your-Secret-Key>' \
-H 'Content-Type: application/json' \
-d '{"serialNumber":"3254a9d0424c4806b9ea3d0763ccfxxx","Name":"NewName"}'

HTTP Request

POST /chat/Chatbot/Edit HTTP/1.1
Host: usapi.hottask.com
Authorization: <Your-Secret-Key>
Content-Type: application/json

{
"serialNumber": "3254a9d0424c4806b9ea3d0763ccfxxx",
"Name": "NewName"
}

Response

The API response will be a JSON object with the following structure:

{
// integer - Operation result (1 indicates success)
"Data": 1,
// string - API version
"Version": "1.0.0",
// boolean - Operation success status
"Success": true,
// integer - HTTP status code
"Code": 200,
// string - Error message if any
"Message": ""
}

Error Handling

If the request fails, you should: 1. Check the HTTP status code for network-level errors 2. Examine the `Code` and `Message` fields in the response for business-level errors 3. The `Message` field will contain detailed error information