POST: Send Voice

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 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 audio document on .WAV format.

Response

The APIs .JSON response should look like this:

{
  "conversationToken": "c3fb84f4-848e-47fc-8969-c3f33b9fcb71",
  "expectUserResponse": true,
  "response": [
    {
      "items": [
        {
          "simpleResponse": {
            "displayText": "Send your document",
            "textToSpeech": "Send your document"
          }
        }
      ],
      "suggestions": []
    }
  ]
}
    • Related Articles

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

      Step 1 To set up your voicebot on Twilio, you first need to generate a webhook by clicking on the generate button in the Twilio settings Step 2 Hereafter, the 'A call comes in' Webhook is needed: Step 3 This webhook must be copied and pasted into the ...
    • 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.