New Intent API

The Wit.ai Team
Wit.ai
Published in
1 min readFeb 20, 2015

If you have been using Wit.ai, you may have wanted to create or update intents programmatically (i.e. without logging in to the Wit Console).

One frequent request we have been hearing from the community is to add expressions programmatically to an existing intent. This would be helpful if you already have a corpus of synonymous expressions that you want to load into an intent to save you the time of typing each and every expression into the Console.

You can now use the HTTP Intent API to not only create or update an intent but also add or remove expressions from existing ones.

Here is an example of Intent creation via the API:

curl -XPOST 'https://api.wit.ai/intents?v=20141022' \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"greetings_mood",
"doc":"detect questions about mood",
"expressions":[{
"body" : "how are you?"
}, {
"body" : "what\u0027s up"
},{
"body" : "how are you doing"
}]}'

Note that it is currently not possible to tag entities while submitting expressions via the API. We will add this in the future.

Please contact us if you have any questions.

Team Wit

--

--