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
Property nameTypePIIDescription
sidSID<FW>
Not PII

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

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34

account_sidSID<AC>

The SID of the Account that created the Flow resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

friendly_namestring

The string that you assigned to describe the Flow.


statusenum<string>

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

Possible values:
draftpublished

versioninteger

The latest version number of the Flow's definition.


date_updatedstring<date-time>

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


urlstring<uri>

The absolute URL of the resource.


linksobject<uri-map>

The URLs of the Flow's nested resources.


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

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
SidSID<FW>required

The SID of the Flow resource to fetch.

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34

Fetch Flow

fetch-flow page anchor
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

Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

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}

Property nameTypeRequiredPIIDescription
SidSID<FW>required

The SID of the Flow resource to delete.

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34
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: