Text Predict API
The Text Predict API enables you to integrate with Kindly's AI backend using long message inquiries such as emails.
To start using the Text Predict API with your bot, you first need to let us know about your application.
- From the dashboard of your Kindly bot, expand Connect in the navigation menu and click Application.
- Click New application.
- Enter a descriptive name for your application.
- Under "webhook", you need to add Kindly's custom Text Predict API webhook (contact your contact person in Kindly(or [email protected]) to get the webhook).
- Click Create application.
- You will now see a new API Key, which will act as your bearer token when interacting with the Text Predict API.
With the API key in hand, you're ready to start integrating Kindly into your application.
Every request should include the header Authorization: Bearer <API_KEY>
You can test you connection using this curl command. Make sure to use your actual API key:
The request may take a few seconds depending on how complex your Kindly bot is set up. The response will include information of the Kindly prediction, and you should validate that you can see your bot_id within the response JSON.
POST a message to https://summly.production.kindly.ai/message.
The POST payload should be in the following format:
- user_id: is a unique identifying for a user / session in the bot.
- message: is the long text.
- language_code: is the two letter language code of your bot. This is the ISO 639-1 format of your bots language. For examples:
- English: en
- Spanish: es
- French: fr
- etc...
- sender: This a text that you decide that should clearly identify who you are. This is include your company and your use-case.
The POST payload from Kindly has the following format: