Modify a Chatbot
The app.neoagent.co API allows you to update the configuration of a specific chatbot by sending a POST request to the /chat/Chatbot/Edit endpoint.
Endpoint
Request URL: https://app.neoagent.co/chat/Chatbot/Edit
Method: POST
Required Headers
The API request must include the following headers:
Authorization: <Your-Secret-Key>- string, required - The secret key to authenticate the API requestContent-Type: application/json- string, required - The content type of the request payload (must be application/json)
Request Body
The request body must contain the following parameters:
{
// string, required - 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 it
"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 responses
"AnswerSuffix": "Asia/Shanghai",
// string, optional - File ID for profile picture
"ChatProfilePicture": "34327",
// string, optional - File ID for chat icon
"ChatIcon": "34327",
// integer, optional - Alignment of the chat bubble
"ChatBubbleAlign": 0,
// string, optional - Color of the chat bubble (RGB format)
"ChatBubbleColor": "rgb(37,99,235)",
// boolean, optional - If showing the 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 upon browser close
"RemoveChatLogOnBrowserClose": false,
// string, optional - Suggested messages
"SuggestedMessage": "",
// string, optional - Email for handoff
"TalkToHumanEmail": "",
// string, optional - Message for handoff to a human
"TalkToHumanResponseMessage": "",
// string, optional - Placeholder text for the input field
"UserInputPlaceholder": "",
// string, optional - Color of user messages (RGB format)
"UserMessageColor": "rgb(59, 129, 246)",
// string, optional - Initial welcome message
"WelcomeMessage": "Hello, I am your AI assistant! How can I help you?",
// string, optional - WhatsApp contact URL
"WhatsappUrl": "",
// boolean, optional - Enable domain verification
"VerifyDomain": false,
// string, optional - Allowed domains for embedding
"Domains": "",
// integer, optional - Maximum number of allowed messages
"RateLimitCount": 20,
// string, optional - Message when rate limit is exceeded
"RateLimitMessage": "Too many consecutive messages",
// integer, optional - Duration of rate limit 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 name of the language, e.g., 'English', 'Spanish', 'French')
"AIResponseLanguage": "",
// integer, optional - Maximum number of allowed messages per month (default value is -1, which means unlimited)
"MessageLimit": -1
}
Parameters
serialNumber- string, required - 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 obtain itSystemMessage- string, optional - System prompt for the chatbotTemperature- integer, optional - Temperature setting for responsesTimeZone- string, optional - Time zone settingAnswerSuffix- string, optional - Text to append to responsesChatProfilePicture- string, optional - File ID for profile pictureChatIcon- string, optional - File ID for chat iconChatBubbleAlign- integer, optional - Alignment of the chat bubbleChatBubbleColor- string, optional - Color of the chat bubble (RGB format)ChatbotPopupOnce- boolean, optional - Indicates whether to show the 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 upon browser closeSuggestedMessage- string, optional - Suggested messagesTalkToHumanEmail- string, optional - Email for handoff to a humanTalkToHumanResponseMessage- string, optional - Message for handoff to a humanUserInputPlaceholder- string, optional - Placeholder text for the input fieldUserMessageColor- string, optional - Color of user messages (RGB format)WelcomeMessage- string, optional - Initial welcome messageWhatsappUrl- string, optional - WhatsApp contact URLVerifyDomain- boolean, optional - Enable domain verificationDomains- string, optional - Allowed domains for embeddingRateLimitCount- integer, optional - Maximum number of allowed messagesRateLimitMessage- string, optional - Message when rate limit is exceededRateLimitTime- integer, optional - Duration of rate limit 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 the full language name, such as "English", "Spanish", "French")MessageLimit- integer, optional - Maximum number of allowed messages per month (default value is -1, which means unlimited)
Request Examples
- JavaScript (Fetch API)
- Python (Requests)
- cURL
- HTTP Raw
const res = await fetch('https://app.neoagent.co/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);
import requests
import json
url = 'https://app.neoagent.co/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 'https://app.neoagent.co/chat/Chatbot/Edit' \
-X POST \
-H 'Authorization: <Your-Secret-Key>' \
-H 'Content-Type: application/json' \
-d '{"serialNumber":"3254a9d0424c4806b9ea3d0763ccfxxx","Name":"NewName"}'
POST /chat/Chatbot/Edit HTTP/1.1
Host: app.neoagent.co
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:
- Check the HTTP status code for network-level errors
- Examine the
CodeandMessagefields in the response for business-level errors - The
Messagefield will contain detailed information about the error