Query

POST /query

Remember to use Client access token for this endpoint

Path

POST "https://api.botengine.ai/query"

Example request

curl -X POST \
  https://api.botengine.ai/query \
  -H 'authorization: Bearer ${CLIENT_ACCESS_TOKEN}' \
  -H 'content-type: application/json;charset=UTF-8' \
  -d '{"query":"hi","sessionId":"0.07575057588346623"}'

Example response

{
  "result": {
    "resolvedQuery": "hi",
    "confidence": 0.7,
    "score": 1,
    "lifespan": 2,
    "incomplete": false,
    "storyId": "58ee11d75fb5580005cb8199",
    "interaction": {
      "id": "58ef978d5fb5580005cb81ac",
      "name": "hello",
      "action": ""
    },
    "parameters": {},
    "contexts": [],
    "fulfillment": "hello world!"
  },
  "sessionId": "0.07575057588346623",
  "timestamp": "2017-04-13T15:23:56.323Z",
  "status": {
    "code": 200,
    "errorType": "success"
  }
}

Return processed text

Required parameters

Property Type Description
query String Text to be processed
Required: true
Max: 2048
sessionId String Required: true
Max: 36
confidence Number Range: 0 -1
lifespan Number Range: 1 -10
reset Boolean Reset conversation
storyId String Story id
Length: 24
trigger String Max: 50