Setting Up a New Bot
To begin utilizing the starter kit, you’ll need to obtain a bot ID. You can create a chatbot either manually or via API.
Creating a Bot Using the SwiftChat API
You can employ any tool or platform to interact with the SwiftChat APIs. In this instance, we’ll demonstrate using curl.
Steps
Open your terminal or command prompt. If you don’t have curl installed, you can install it using npm by running the
npm install -g curlcommand in your terminalCreate a new POST request using curl
Use the following API endpoint:
https://v1-api.swiftchat.ai/api/botsInclude your API key in the header that you obtained during Obtaining API Key
In the body, include details such as bot-name, mobile-number, and bot-category
Add the header and the body to your curl request:
curl --location 'https://v1-api.swiftchat.ai/api/bots' \ --header "Content-Type: application/json" \ --header "Authorization: Bearer YOUR_API_KEY_HERE" \ --data '{ "mobile": "+91XXXXXXXXXX", "configuration": { "name": "Test" "category":"Education" } }'
On successfully creating bot you will receive a message indicating created.
After creating bot, use the **varify API** to generate the bot ID.
Creating a Bot Using the SwiftChat Dashboard
You can also create bot using your SwiftChat Merchant Dashboard
Steps:
Login to your SwiftChat Merchant Dashboard.
Tip
Create your merchant account using this Post API
Complete business KYC and email varification
Click on Add New Bot button.
Clicking Add New Bot button will redirect you to a page where you can input the bot details, including the phone number, bot name, and bot type.Enter these details and proceed for verification. Once verification is completed, the bot will be created and activated.
Copy the bot link and save it for future reference. The link should resemble this format:
https://cgweb.page.link/?link=https%3A%2F%2Fweb.convegenius.ai%3FbotId%3D0216260609726241&apn=ai.convegenius.app
In the link, the bot ID is structured as botId%3D0216260609726241, where the actual ID follows the “3D” prefix. So here the ID is 0216260609726241.