Create API Guide

The Chatbot Creation API allows you to create a new chatbot by making a POST request to the /bots.

Endpoint

POST https://s5hxhnuksu6hwzu6dvnquqzw7q0nrqxe.lambda-url.us-east-1.on.aws/bots

Request Headers

The API request must include the following headers:

  • x-api-key: <Your-Secret-Key> - The secret key for authenticating the API request.

Request Body

The request body should contain the following parameters:

name
string
required

The name of the chatbot.

featured
array

Array of featured products.

products
array

Array of products.

email_support
boolean
required

The email address for support.

owner
string
required

The owner of the chatbot.

image
string<url>

The image of the chatbot.

active
boolean
default: "true"

The status of the chatbot.

created
string<date-time>
default: "2024-02-29T20:52:02.100162"

The date the chatbot was created.

modified
string<date-time>
default: "2024-02-29T20:52:02.100166"

The date the chatbot was modified.

role
string
default: "customer_support"

Role of the chatbot.

customize
object
required
is_gpt_4
boolean
default: "false"

Is the bot GPT-4?

gpt_api_key
string

GPT API Key

human_support_email
string<email>

Human support email

Request Body Example

Responses

  • 201 Successful Response

  • 422 Validation Error

Example Request

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