SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site,, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Autopilot Custom Channel Sample API Request

To make the Autopilot assistant request, your application needs to make an HTTP POST request to Twilio’s Autopiliot Custom Channel API with 3 required pieces of information; user id, text message, and setting "en-US" to indicate that this is the language being used.

  • UserId: Free format string to identify the user making the request. This will be used by Autopilot for Dialogue and state management.
  • Text:  The user's text input, such as "Hello".
  • Language: language for the exchange. This should always be "en-US".

Warning: Autopilot currently only supports US English. We do not have plans to add support for additional languages at this time.

Sample Code

Here's an example cURL for starting an Autopilot dialogue using Autopilot Custom Channel:

curl -XPOST{channel reference string} \
--data-urlencode 'UserId=David' \
--data-urlencode 'Text="Hello"' \
--data-urlencode 'Language=en-US'

This example will make an API request to your Autopilot assistant. The POST response will be in the JSON format and include the content to display back to the user.

To make this curl script work for you:

  • Line 1 update with your Account SID, assistant SID, and a unique name for your channel.
  • Line 2 update the user parameter in curl with your  Account SID and Auth Token. This will generate the authorization basic header that is required.
  • Line 3 update with a userid to indicate who is interacting with your Autopilot assistant.
  • Line 4 update with the text you want to send to the assistant.
  • Line 5 ensure that the Language is set to "en-US".

For full details on each of the available options, please see Autopilot: Custom Channel (Twilio Docs).

Have more questions? Submit a request
Powered by Zendesk