POST: Send Message

POST: Send Message

API URL: https://platform.blits.ai/api/external/messages/<YOUR_CONVERSATION_ID>/text

With this POST request a message can be send to the bot. Please follow the following steps to do so.

Conversation ID

This is the output of the POST Conversation ID API. Please put the value between two forward slashes so that <YOUR_CONVERSATION_ID> is replaced.

Authorization

To set this up, the above API URL is need together with the authorization header. The header should have the following format:

Bearer <key>

The key can be obtained from the API settings on the settings page of your bot under the JSON Web Token:

Body

The body should contain the message that should be send to the bot in the following .JSON format:

{
"message": "I want to return it"
}

Response

The APIs .JSON response should look like this:

{
  "conversationToken": "e2e8dd3f-9cd9-47e7-b061-d6b0fd71efcf",
  "expectUserResponse": true,
  "response": [
    {
      "items": [
        {
          "simpleResponse": {
            "displayText": "Please download the following form. Fill in all the required fields and print it afterwards. Please show the form at the nearest postal office together with your package.",
            "textToSpeech": "Please download the following form. Fill in all the required fields and print it afterwards. Please show the form at the nearest postal office together with your package."
          }
        },
        {
          "adaptiveCard": {
            "type": "AdaptiveCard",
            "body": [
              {
                "type": "Container",
                "items": [
                  {
                    "type": "Image",
                    "size": "small",
                    "url": "https://blitsproduction.z6.web.core.windows.net/pdf-icon.png"
                  },
                  {
                    "type": "TextBlock",
                    "text": "Dummy_PDF.pdf"
                  }
                ],
                "selectAction": {
                  "type": "Action.OpenUrl",
                  "url": "https://platform.blits.ai/api/block-download-file/28600-whitelabeled---customer-support/f213e429-96f5-49b2-a8cb-a84ec8361534/Dummy_PDF.pdf"
                }
              }
            ]
          }
        }
      ],
      "suggestions": []
    }
  ]
}
    • Related Articles

    • POST: Send Voice

      API URL: https://platform.blits.ai/api/external/messages/<YOUR_CONVERSATION_ID>/speech With this POST request a message can be send to the bot. Please follow the following steps to do so. Conversation ID This is the output of the POST Conversation ID ...
    • POST: Send file

      API URL: https://platform.blits.ai/api/external/messages/<YOUR_CONVERSATION_ID>/text With this POST request a message can be send to the bot. This API only works if the bot is expecting a file. Please follow the following steps to execute the API. ...
    • Message

      The message block provides a message to the user of the conversation flow
    • POST: Conversation ID

      API URL: https://platform.blits.ai/api/external/initialize With this POST request a new conversation ID is created. The conversation ID is used to interact with the chatbot. The conversation ID is needed for the other APIs to return information such ...
    • Send image

      The Send Image block provides the ability to send an image or gifs to the user in the conversation flow.