POST: Send file

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.

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 attachment in a format that is accepted by the 'Receive Attachment' block in your flow.

Response

Depending on whether there is a message after the 'Receive Attachment' block, the output will look similar to the below.

Without following message:

{
  "conversationToken": "0cef8139-8af8-4936-9f48-589825e492c7",
  "expectUserResponse": true,
  "response": [
    {
      "items": [],
      "suggestions": []
    }
  ]
}

With following message:

{
  "conversationToken": "0cef8139-8af8-4936-9f48-589825e492c7",
  "expectUserResponse": true,
  "response": [
    {
      "items": [
        {
          "simpleResponse": {
            "displayText": "Thank you",
            "textToSpeech": "Thank you"
          }
        }
      ],
      "suggestions": []
    }
  ]
}
    • Related Articles

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

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

      The send attachment block sends an attachment to the user that is stored in the in the flow.
    • Send email

      With the send email block, you can send an email to a recipient upon triggering the block. Fill in the email address of the recipient, the topic of the email and the content of the mail in the designated fields. You can also use variables using the ...