Delete a Chatbot

Delete a Chatbot

This page helps you delete a Chatbot.

The Chatbot Deletion API allows you to delete a chatbot by providing the chatbot ID. This API can be used to remove a chatbot and its associated data from the system.

Endpoint

DELETE https://www.chatzuri.com/api/v1/delete-chatbot

Request Headers

The API request must include the following headers.
  • Authorization: Bearer - The secret key for authenticating the API request.

Query Parameters

The request body should contain 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 URL

Request URL
https://www.chatzuri.com/api/v1/delete-chatbot?chatbotId=exampleId-123

const res = await fetch(
'https://www.chatzuri.com/api/v1/delete-chatbot?chatbotId=exampleId-123',
{
    method: 'DELETE',
    headers: {
    Authorization: `Bearer `
    }
}
);

const data = await res.json();

console.log(data); // {message: 'Deleted successfully'}
                                                                
                                                                

import requests

url = 'https://www.chatzuri.com/api/v1/delete-chatbot'
params = {'chatbotId': 'exampleId-123'}
headers = {
    'Authorization': 'Bearer '
}

response = requests.delete(url, params=params, headers=headers)
data = response.json()

print(data)  # {'message': 'Deleted successfully'}
                                                                
                                                                


                                                                
                                                                

curl "https://www.chatzuri.com/api/v1/delete-chatbot?chatbotId=exampleId-123" \
--request "DELETE" \
-H 'Authorization: Bearer '
                                                                
                                                                

DELETE /api/v1/delete-chatbot?chatbotId=exampleId-123 HTTP/1.1
Host: www.chatzuri.com
Authorization: Bearer 
                                                                
                                                                

Response

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

{
    "message": "Deleted successfully"
}

The message field in the response indicates the success of the chatbot deletion operation.

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 delete a chatbot using the create API.