APIs

Text Predict API

The Text Predict API enables you to integrate with Kindly's AI backend using long message inquiries such as emails.

Getting started

New application

To start using the Text Predict API with your bot, you first need to let us know about your application.

  1. From the dashboard of your Kindly bot, expand Connect in the navigation menu and click Application.
  2. Click New application.
  3. Enter a descriptive name for your application.
  4. 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).
  5. Click Create application.
  6. You will now see a new API Key, which will act as your bearer token when interacting with the Text Predict API.

Authorization

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>

Test Your Connection (with cURL)

You can test you connection using this curl command. Make sure to use your actual API key:

Shell


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.

Sending and receiving

Sending

POST a message to https://summly.production.kindly.ai/message.

The POST payload should be in the following format:

JSON

  • 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.

Receiving

The POST payload from Kindly has the following format:

JSON