Default Interactions

GET /interactions/welcome

Path

GET "https://api.botengine.ai/stories/:storyId/interactions/welcome"

Example request

curl -X GET \
  https://api.botengine.ai/stories/$596e28b4d17bf3000737d424/interactions/welcome \
  -H 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}'

Example response

{
    "name": "Welcome Interaction",
    "responses": [
        {
            "type": "text",
            "messages": [
                "Hi $default_name"
            ]
        }
    ],
    "id": "596e28b4d17bf3000737d425"
}

Returns Default Welcome Interaction object for the story with the specified id.

PUT /interactions/welcome

Path to update Default Welcome Interaction.

Path

PUT "https://api.botengine.ai/stories/:storyId/interactions/welcome"

Example request

curl -X PUT \
  https://api.botengine.ai/stories/596e28b4d17bf3000737d424/interactions/welcome \
  -H 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
    "responses": [
        {
            "type": "text",
            "messages": [
                "Hi $default_name"
            ]
        }
    ],
    "disabled": false
}'

Example response

{
    "timestamp": "2017-07-19T10:39:02.916Z",
    "status": {
        "code": 200,
        "type": "success"
    }
}

Required parameters

Property Type Description
responses Array.<Object> Array max size: 11
disabled Boolean

Responses should contain objects with structure dependent on type of response. Click here to read more.

GET /interactions/fallback

Path

GET "https://api.botengine.ai/stories/:storyId/interactions/fallback"

Example request

curl -X GET \
  https://api.botengine.ai/stories/$596e28b4d17bf3000737d424/interactions/fallback \
  -H 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}'

Example response

{
    "name": "Fallback Interaction",
    "responses": [
        {
            "type": "text",
            "messages": [
                "One more time?",
                "What was that?",
                "I missed what you said. Say it again?",
                "I don't understand, can you repeat?"
            ]
        }
    ],
    "disabled": false,
    "id": "596e28b4d17bf3000737d426"
}

Returns Default Fallback Interaction object for the story with the specified id.

PUT /interactions/fallback

Path to update Default Fallback Interaction.

Path

PUT "https://api.botengine.ai/stories/:storyId/interactions/fallback"

Example request

curl -X PUT \
  https://api.botengine.ai/stories/596e28b4d17bf3000737d424/interactions/fallback \
  -H 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
      "responses": [
          {
              "type": "text",
              "messages": [
                  "One more time?",
                  "What was that?",
                  "I missed what you said. Say it again?"
              ]
          }
      ],
      "disabled": false
}'

Example response

{
    "timestamp": "2017-07-19T10:39:02.916Z",
    "status": {
        "code": 200,
        "type": "success"
    }
}

Required parameters

Property Type Description
responses Array.<Object> Array max size: 11
disabled Boolean Fallback interaction is disabled (true:false)

Responses should contain objects with structure dependent on type of response. Click here to read more.