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

{
  "name": "string",
  "featured": [
    null
  ],
  "products": [],
  "email_support": true,
  "owner": "string",
  "image": "string",
  "active": true,
  "created": "2024-03-01T22:14:49.048440",
  "modified": "2024-03-01T22:14:49.048444",
  "role": "customer_support",
  "customize": {
    "color": "string",
    "conversation_style": "chat",
    "language": "english",
    "company_name": "string",
    "welcome_message": "string",
    "schedule_demo_link": "string",
    "sub_heading": "string",
    "offline_messages": false,
    "deck_ai_branding": false,
    "suggested_questions": [
      {
        "question": "string",
        "response": "string"
      }
    ],
    "notifications": {
      "push": false,
      "email": false
    },
    "position_left": false,
    "chat_inputbox_placeholder": "string"
  },
  "is_gpt_4": false,
  "gpt_api_key": "string",
  "human_support_email": "user@example.com"
}

Responses

  • 201 Successful Response

  • 422 Validation Error

null

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.