API Overview
Twilio Autopilot will be shut down on August 25, 2023.
Twilio Autopilot will be disabled for all users on August 25, 2023. After this date, customers won’t be able to access the Autopilot APIs, Console Experience, Studio Widget, and docs. Additionally, Twilio will discontinue including Autopilot support in the new helper library releases and customer support won’t answer tickets or requests regarding Autopilot after Feb 25, 2023. For full details, including migration options, see Autopilot Support at Twilio.
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 | Examples |
---|---|---|
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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.