Redirect
Hand the call to another URL on your server, which returns the next voice actions.
Hand the call to another URL on your server, which returns the next voice actions.
redirect hands the call to another URL on your server. Sautikit requests that URL and runs the voice actions it returns.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL that returns the next voice actions. |
method | string | No | HTTP method for the request: POST (default) or GET. |
import { sauti } from "@sautikit/node";
res.json(sauti.redirect("https://your-app.example.com/voice/next-step", {
method: "POST",
}));{
"actions": [
{
"redirect": {
"url": "https://your-app.example.com/voice/next-step",
"method": "POST"
}
}
]
}<Redirect method="POST">https://your-app.example.com/voice/next-step</Redirect>