New Intent API

The Wit.ai Team
Feb 20, 2015 · 1 min read

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

Wit.ai

Wit.ai makes it easy for developers to build applications and devices that you can talk or text to. Our vision is to empower developers with an open and extensible natural language platform. We'll use this blog to share news, feature announcements and stories from our community.

    The Wit.ai Team

    Written by

    The people behind Wit

    Wit.ai

    Wit.ai

    Wit.ai makes it easy for developers to build applications and devices that you can talk or text to. Our vision is to empower developers with an open and extensible natural language platform. We'll use this blog to share news, feature announcements and stories from our community.

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade