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
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:
Array of featured products.
The email address for support.
The owner of the chatbot.
The image of the chatbot.
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.
The conversation style of the bot
The language of the bot
Enum: "french"
,"english"
The company name of the bot
The welcome message of the bot
The schedule demo link of the bot
The sub heading of the bot
The offline messages of the bot
Deck AI branding of the bot
chat_inputbox_placeholder
Chat inputbox placeholder
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
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.