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 requestContent-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 chatbotName
- string, optional - New name for the chatbotModel
- string, optional - AI model ID, you can call the Get Model List interface to obtainSystemMessage
- string, optional - System prompt for the chatbotTemperature
- integer, optional - Temperature setting for responsesTimeZone
- string, optional - Time zone settingAnswerSuffix
- string, optional - Text to append to answersChatProfilePicture
- string, optional - File ID for profile pictureChatIcon
- string, optional - File ID for bubble iconChatBubbleAlign
- integer, optional - Alignment of chat bubbleChatBubbleColor
- string, optional - Color of chat bubble (RGB format)ChatbotPopupOnce
- boolean, optional - Whether to show popup only onceChatbotPrivacyPolicyDescription
- string, optional - Privacy policy descriptionChatbotPrivacyPolicyName
- string, optional - Privacy policy nameChatbotPrivacyPolicyUrl
- string, optional - Privacy policy URLEnablePushToTalk
- boolean, optional - Enable push-to-talk featureEnableUploadImage
- boolean, optional - Enable image upload featureFacebookUrl
- string, optional - Facebook page URLInstagramUrl
- string, optional - Instagram profile URLRemoveChatLogOnBrowserClose
- boolean, optional - Clear chat history on browser closeSuggestedMessage
- string, optional - Suggested messagesTalkToHumanEmail
- string, optional - Email for human handoffTalkToHumanResponseMessage
- string, optional - Message when transferring to humanUserInputPlaceholder
- string, optional - Placeholder text for input fieldUserMessageColor
- string, optional - Color of user messages (RGB format)WelcomeMessage
- string, optional - Initial greeting messageWhatsappUrl
- string, optional - WhatsApp contact URLVerifyDomain
- boolean, optional - Enable domain verificationDomains
- string, optional - Allowed domains for embeddingRateLimitCount
- integer, optional - Maximum messages allowedRateLimitMessage
- string, optional - Rate limit exceeded messageRateLimitTime
- integer, optional - Rate limit duration in secondsCustomDomain
- string, optional - Custom domain for embeddingEmailForDailyChatLogs
- string, optional - Email for daily chat logsEmailForDailyLeads
- string, optional - Email for daily leadsAIResponseLanguage
- 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