Update

HTTP Request

PUT https://api.botfuel.io/trainer/api/v0/intents/<intent:id>

Request Structure

Parameter Type Description Required
utterances Array Array of phrases and questions to trigger this Intent Required
label String Given label for this Intent Required
description Array Description of this Intent Required
resolvePrompt String Text displayed to user when bot identifies several QnAs or Intents Required

Response structure

Parameter Type Description
description Array Description of this Intent
id String Unique identifier for this Intent
label String Given label for this Intent
resolvePrompt String Text displayed to user when bot identifies several QnAs or Intents
trainingScore Integer Integer between 0 and 1 representing how well-trained the Intent is
utterances Array Array of phrases to trigger this Intent

Example

curl -d '{
  "utterances": [
    { "value": "First way of triggering this Intent" },
    { "value": "Second way of triggering this Intent" }
  ],
  "label": "intent-label",
  "description": "This is an intent to describe intents",
  "resolvePrompt": "Triggering intents"
}' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY" \
-H "Content-Type: application/json" \
-X PUT 'https://api.botfuel.io/trainer/api/v0/intents/<intent:id>'
// Response
{
  "intent": {
    "description": "This is an intent to describe intents",
    "id": "5b559dd3e44b330012882a88",
    "label": "intent-label",
    "resolvePrompt": "Triggering intents",
    "trainingScore": null,
    "utterances": [
      {
        "value": "First way of triggering this Intent"
      },
      {
        "value": "Second way of triggering this Intent"
      }
    ]
  }
}