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?

Redirect

Redirect routes the user to a different Task or URL. When redirecting to a Task, the target Task's Actions will be executed. When redirected to a URL, the Actions will be fetched from the URL and executed.

Redirecting to a URL allows you to dynamically generate the Actions JSON at any point of the dialogue. See The Autopilot Request documentation to see the parameters sent.

Example 1: Redirect to a Task

{
	"actions": [
		{
			"redirect": "task://customer-satisfaction-survey"
		}
	]
}

Redirecting to URLs

When redirecting to a URL, Redirect will make an HTTP callback to your application and will expect an Autopilot Actions JSON as a response. The request will contain all the dialogue information.

Request Parameters

See the Autopilot Request to see the callback parameters.

Example 2: Redirect to a URL

{
    "actions": [
        {
            "redirect": {
                  "uri": "https://myapp.com/actions",
                  "method": "POST"
            }
        }
    ]
}
Rate this page:

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.