Update a chatbot
The Chatbot Data Update API allows you to update the data for a chatbot by providing the chatbot ID, new name, and source text for text content. This API can be used to replace the existing data of a chatbot with new information.
Endpoint
Request Headers
The API request must include the following header:
Authorization: Bearer <Your-Secret-Key>
- The secret key for authenticating the API request.
Request Payload
The request payload should be sent as a JSON object in the body of the API request. The payload can include the following parameters:
-
chatbotId
(required): A unique identifier for the chatbot. It helps to identify the specific chatbot whose data needs to be updated. -
chatbotName
(required): The new name for the chatbot. This parameter allows you to update the name of the chatbot. -
sourceText
(optional): The new source text to update the chatbot. This parameter should contain the new text content that replaces the existing data. The source text should be less than the character limit allowed by your plan.
Example Request
Response
The API response will be a JSON object with the following structure:
The chatbotId
field in the response contains the unique identifier assigned to the created chatbot.
Error Handling
If there are any errors during the API request, appropriate HTTP status codes will be returned along with error messages in the response body. Make sure to handle these errors gracefully in your application.
That’s it! You should now be able to update a chatbot using the Chatbot Update API.