Get Chatbots API Guide

Get Chatbots API Guide

Get a list of all chatbots under your API key.

The Get Chatbots API endpoint allows you to retrieve a list of all chatbots associated with your API key.

Endpoint

POST https://www.chatzuri.com/api/v1/get-chatbots

Request Headers

The API request must include the following headers.
  • Authorization: Bearer - The secret key for authenticating the API request.
  • Accept: application/json - The accepted response content type.
  • Content-Type: application/json - The content type of the request.

Example Request


const options = {method: 'GET', headers: {accept: 'application/json'}};

fetch('https://www.chatzuri.com/api/v1/get-chatbots', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));


import requests

url = "https://www.chatzuri.com/api/v1/get-chatbots"

headers = {"accept": "application/json"}

response = requests.get(url, headers=headers)

print(response.text)





curl --request GET \
     --url https://www.chatzuri.com/api/v1/get-chatbots \
     --header 'accept: application/json'


GET /api/v1/get-chatbots HTTP/1.1
Accept: application/json
Host: www.chatzuri.com

Response

The API response codes
  • 200 - Returns an array chatbots[] containing each chatbot's parameters.
  • 401 - If the API request is unauthorized..
  • 500 - If there is an internal server error while processing the request.
The API response will be a JSON object with the following structure:

{  
  "chatbots": [  
    {  
      "chatbot_id": "string",  
      "created_at": "string",  
      "chatbot_owner_user_id": "string",
      "chatbot_name": "string, 
      "phone": "string",  
      "email": "string",  
      "source_text": "string"  
    },{  
      "chatbot_id": "string",  
      "created_at": "string",  
      "chatbot_owner_user_id": "string",
      "chatbot_name": "string",  
      "phone": "string",  
      "email": "string", 
      "source_text": "string"
    }  
  ]  
}

The Get Chatbots API endpoint provides a way to retrieve a list of all chatbots associated with your API key. Each entry in the response array contains all parameters of the respective 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 upload a chatbot profile-picture using the Chatbot profile picture API.