Flows are individual workflows that you create. They can handle one or more use cases.
The unique string that we created to identify the Flow resource.
^FW[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Flow resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The status of the Flow. Can be: draft
or published
.
draft
published
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 the Flow's nested resources.
GET https://studio.twilio.com/v1/Flows/{Sid}
The SID of the Flow resource to fetch.
^FW[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 fetchFlow() {11const flow = await client.studio.v112.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.fetch();1415console.log(flow.sid);16}1718fetchFlow();
1{2"sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"friendly_name": "Test Flow",5"status": "published",6"version": 1,7"date_created": "2017-11-06T12:00:00Z",8"date_updated": null,9"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",10"links": {11"engagements": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements",12"executions": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions"13}14}
GET https://studio.twilio.com/v1/Flows
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 listFlow() {11const flows = await client.studio.v1.flows.list({ limit: 20 });1213flows.forEach((f) => console.log(f.sid));14}1516listFlow();
1{2"meta": {3"previous_page_url": null,4"next_page_url": null,5"url": "https://studio.twilio.com/v1/Flows?PageSize=50&Page=0",6"page": 0,7"first_page_url": "https://studio.twilio.com/v1/Flows?PageSize=50&Page=0",8"page_size": 50,9"key": "flows"10},11"flows": []12}
DELETE https://studio.twilio.com/v1/Flows/{Sid}
The SID of the Flow resource to delete.
^FW[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 deleteFlow() {11await client.studio.v1.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").remove();12}1314deleteFlow();