You can now subscribe to Studio Events for Executions and Steps instead of polling via the REST API. Simplify your data ingestion with Event Streams for Studio.
A Step is the runtime processing of a Widget, starting when that Widget is entered. Variables get set at the end of a Step.
If you're prompting a user for a text input, when they receive the inbound SMS prompt, they are actively in a Step until they exit the Widget (send a response or timeout). If the prompt is intended to set a variable, this happens at the end.
You can now subscribe to Studio Events for Executions and Steps instead of polling via the REST API. Simplify your data ingestion with Event Streams for Studio.
The unique string that we created to identify the ExecutionStep resource.
^FT[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the ExecutionStep resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Flow.
^FW[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Step's Execution resource.
^FN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The current state of the Flow's Execution. As a flow executes, we save its state in this context. We save data that your widgets can access as variables in configuration fields or in text areas as variable substitution.
The date and time in GMT when the resource was created specified in ISO 8601 format.
The date and time in GMT when the resource was last updated specified in ISO 8601 format.
The URLs of related resources.
GET https://studio.twilio.com/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}
The SID of the Flow with the Step to fetch.
^FW[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Execution resource with the Step to fetch.
^FN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the ExecutionStep resource to fetch.
^FT[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchExecutionStep() {11const step = await client.studio.v112.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")14.steps("FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")15.fetch();1617console.log(step.sid);18}1920fetchExecutionStep();
1{2"sid": "FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"flow_sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",5"execution_sid": "FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",6"parent_step_sid": null,7"name": "incomingRequest",8"context": {},9"transitioned_from": "Trigger",10"transitioned_to": "Ended",11"date_created": "2017-11-06T12:00:00Z",12"date_updated": null,13"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",14"links": {15"step_context": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"16}17}
GET https://studio.twilio.com/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps
Step resources are listed in reverse chronological order (most recent is first).
The SID of the Flow with the Steps to read.
^FW[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Execution with the Steps to read.
^FN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listExecutionStep() {11const steps = await client.studio.v112.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")14.steps.list({ limit: 20 });1516steps.forEach((s) => console.log(s.sid));17}1819listExecutionStep();
1{2"meta": {3"previous_page_url": null,4"next_page_url": null,5"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0",6"page": 0,7"first_page_url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0",8"page_size": 50,9"key": "steps"10},11"steps": []12}