Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

API Overview

The Autopilot REST API allows you to build, train and test your virtual assistants.

API Base URL

All URLs in the reference documentation use the following base URL:

https://autopilot.twilio.com/v1/

All requests to the Autopilot REST API are served over HTTPS. Unencrypted HTTP is not supported.

Authentication

HTTP requests to the REST API are protected with HTTP Basic authentication like other REST APIs provided by Twilio. To learn more about how Twilio handles authentication, please refer to our security documentation. In short, you will use your Twilio account SID as the username and your auth token as the password for HTTP Basic authentication.

curl -G https://autopilot.twilio.com/v1/Assistants \
    -u '[YOUR ACCOUNT SID]:[YOUR AUTH TOKEN]'

You can find your account SID and auth token in the Twilio console. Alternately, you can also use API keys and secrets to authenticate REST API requests - you can manage API key pairs in the console also.

Twilio Helper Libraries

You can use the Twilio Helper Libraries to interact with the Autopilot REST endpoints.

Autopilot is available in the Next Gen Release builds of the Twilio Helper Libraries.

Resources

Here are the resources you will be interacting with via the REST API:

Resource Description
Assistants Assistants are your different bots or conversational applications. owl-cafe-bot
Tasks Tasks describe what the end-user would like to do. The end-user may express this intent over a phone call or SMS Message. order-coffee, check-menu
Samples Samples are text examples of how end-user might express an intent. These samples are used to train the machine learning model to recognize intents and extract field values. Can I have a {OrderDrinkSize} {OrderDrinkType},
I'll have a {OrderDrinkSize} {OrderDrinkType}
Fields Fields are the expected attributes that give details about the intent expressed by the end-user. Each intent may have multiple fields associated with it. OrderDrinkSize, OrderDrinkType
Field Types Field Types are the type of fields: date, time, amount, city, etc. drinkSize, drinkType
Field Values Field Values are the sample value for a given field type. drinkSize: small, medium, large
drinkType: latte, espresso, cappuccino
Model Builds Model Builds are built and trained models with all the intents, fields, and samples provided that can perform natural language analysis. v-01
Queries Queries represent the end-user's input that is analyzed through a natural language understanding model. The query returns the intent and relevant fields in json format. "Can I have a small cappuccino",
"I'll get a medium latte",
"I want a espresso"

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

Loading Code Sample...