Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Flow


Flows are individual workflows that you create. They can handle one or more use cases.


Flow Properties

flow-properties page anchor
Resource properties
sidtype: SID<FW>Not PII

The unique string that we created to identify the Flow resource.


friendly_nametype: stringNot PII

The string that you assigned to describe the Flow.


statustype: enum<STRING>Not PII

The status of the Flow. Can be: draft or published.

Possible values:
draftpublished

versiontype: integerNot PII

The latest version number of the Flow's definition.


date_createdtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was created specified in ISO 8601(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601(link takes you to an external page) format.


urltype: string<URI>Not PII

The absolute URL of the resource.


linkstype: object<URI MAP>Not PII

The URLs of the Flow's nested resources.


GET https://studio.twilio.com/v1/Flows/{Sid}

Parameters

fetch-parameters page anchor
URI parameters
Sidtype: SID<FW>Not PII
Path Parameter

The SID of the Flow resource to fetch.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.studio.v1.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.fetch()
_10
.then(flow => console.log(flow.friendlyName));

Output

_14
{
_14
"sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"friendly_name": "Test Flow",
_14
"status": "published",
_14
"version": 1,
_14
"date_created": "2017-11-06T12:00:00Z",
_14
"date_updated": null,
_14
"url": "https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"links": {
_14
"engagements": "https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Engagements",
_14
"executions": "https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions"
_14
}
_14
}


GET https://studio.twilio.com/v1/Flows

URI parameters
PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.studio.v1.flows.list({limit: 20})
_10
.then(flows => flows.forEach(f => console.log(f.sid)));

Output

_12
{
_12
"meta": {
_12
"previous_page_url": "https://studio.twilio.com/v1/Flows?PageSize=50&Page=0",
_12
"next_page_url": "https://studio.twilio.com/v1/Flows?PageSize=50&Page=1",
_12
"url": "https://studio.twilio.com/v1/Flows?PageSize=50&Page=0",
_12
"page": 0,
_12
"first_page_url": "https://studio.twilio.com/v1/Flows?PageSize=50&Page=0",
_12
"page_size": 50,
_12
"key": "flows"
_12
},
_12
"flows": []
_12
}


DELETE https://studio.twilio.com/v1/Flows/{Sid}

URI parameters
Sidtype: SID<FW>Not PII
Path Parameter

The SID of the Flow resource to delete.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.studio.v1.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove();


Rate this page: