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

Flow Revision


Flows Revisions track every change made to a Flow resource. Revisions are automatically created when a Flow is created or updated. Each revision is read-only and immutable (cannot be updated or deleted).

For convenience, the latest Revision and latest published Revision can be fetched using the magic identifiers LatestPublished and LatestRevision in place of an integer.

Fetching the parent Flow resource will always return the latest Flow Revision.


FlowRevision Properties

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

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


friendly_nametype: string

The string that you assigned to describe the Flow.


definitiontype: object

JSON representation of flow definition.


statustype: enum<string>

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

Possible values:
draftpublished

revisiontype: integer

The latest revision number of the Flow's definition.


commit_messagetype: string

Description of change made in the revision.


validtype: boolean

Boolean if the flow definition is valid.


errorstype: array

List of error in the flow definition.


date_createdtype: string<date-time>

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>

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>

The absolute URL of the resource.


Fetch a FlowRevision resource

fetch-a-flowrevision-resource page anchor
GET https://studio.twilio.com/v2/Flows/{Sid}/Revisions/{Revision}

Parameters

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

The SID of the Flow resource to fetch.


Revisiontype: string
Path ParameterNot PII

Specific Revision number or can be LatestPublished and LatestRevision.

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

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

Output

_16
{
_16
"sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"definition": {
_16
"initial_state": "Trigger"
_16
},
_16
"friendly_name": "Test Flow",
_16
"status": "published",
_16
"revision": "1",
_16
"commit_message": null,
_16
"valid": true,
_16
"errors": [],
_16
"date_created": "2017-11-06T12:00:00Z",
_16
"date_updated": null,
_16
"url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions/1"
_16
}


Read multiple FlowRevision resources

read-multiple-flowrevision-resources page anchor
GET https://studio.twilio.com/v2/Flows/{Sid}/Revisions

URI parameters
Sidtype: SID<FW>
Path ParameterNot PII

The SID of the Flow resource to fetch.


PageSizetype: integer
Query ParameterNot PII

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


Pagetype: integer
Query ParameterNot PII

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


PageTokentype: string
Query ParameterNot PII

The page token. This is provided by the API.

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

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

Output

_27
{
_27
"meta": {
_27
"previous_page_url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions?PageSize=50&Page=0",
_27
"next_page_url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions?PageSize=50&Page=1",
_27
"url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions?PageSize=50&Page=0",
_27
"page": 0,
_27
"first_page_url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions?PageSize=50&Page=0",
_27
"page_size": 50,
_27
"key": "revisions"
_27
},
_27
"revisions": [
_27
{
_27
"sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"friendly_name": "Test Flow",
_27
"status": "published",
_27
"revision": 1,
_27
"definition": null,
_27
"commit_message": null,
_27
"valid": null,
_27
"errors": null,
_27
"date_created": "2017-11-06T12:00:00Z",
_27
"date_updated": "2017-11-06T12:00:00Z",
_27
"url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions/1"
_27
}
_27
]
_27
}


Rate this page: