NAME
Twilio::Rest::Studio::V2::Flow - The Flow resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $flow = $client->studio->v2->flows->create($friendly_name, $status, $definition, \%options);
for my $flow ($client->studio->v2->flows->read({}, 20)) {
...
}
my $flow = $client->studio->v2->flows($sid)->fetch;
$client->studio->v2->flows($sid)->update($status, \%options);
$client->studio->v2->flows($sid)->delete;
DESCRIPTION
Studio flows
This file holds FlowList, FlowPage, FlowContext and FlowInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
FlowList
Returned by $client->studio->v2->flows. See also Twilio::ListResource.
create
my $flow = $client->studio->v2->flows->create($friendly_name, $status, $definition, \%options);
Create a Flow. Returns a FlowInstance.
The required values are:
$friendly_name-
The string that you assigned to describe the Flow.
$status-
One of
draftorpublished. $definition-
JSON representation of flow definition. A hash or array reference, or a string of JSON.
The options are:
-
The SID of the User that created the Flow.
commit_message-
Description of change made in the revision.
read
my @records = $client->studio->v2->flows->read(\%options, $limit, $page_size);
Retrieve a list of all Flows. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->studio->v2->flows->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->studio->v2->flows->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->studio->v2->flows->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->studio->v2->flows->get_context($sid);
Returns a FlowContext, and makes no request.
FlowPage
A Twilio::Page of FlowInstance objects.
records_key
build_instance
Used by Twilio::Page.
FlowContext
Returned by $client->studio->v2->flows($sid). It makes no request until one of these methods is called.
fetch
my $flow = $client->studio->v2->flows($sid)->fetch;
Retrieve a specific Flow. Returns a FlowInstance.
update
my $flow = $client->studio->v2->flows($sid)->update($status, \%options);
Update a Flow. Returns a FlowInstance.
The required values are:
The options are:
-
The SID of the User that created or last updated the Flow.
commit_message-
Description of change made in the revision.
definition-
JSON representation of flow definition. A hash or array reference, or a string of JSON.
friendly_name-
The string that you assigned to describe the Flow.
delete
$client->studio->v2->flows($sid)->delete;
Delete a specific Flow. Returns true.
executions
my $list = $object->executions;
my $context = $object->executions($sid);
See Twilio::Rest::Studio::V2::Flow::Execution.
revisions
my $list = $object->revisions;
my $context = $object->revisions($revision);
See Twilio::Rest::Studio::V2::Flow::FlowRevision.
test_users
my $context = $object->test_users;
See Twilio::Rest::Studio::V2::Flow::FlowTestUser.
FlowInstance
See also Twilio::InstanceResource.
It has fetch, update, delete, executions, revisions and test_users, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Flow resource.
-
The SID of the User that created or last updated the Flow.
- commit_message
-
Description of change made in the revision.
- date_created
-
The date and time in GMT when the resource was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_updated
-
The date and time in GMT when the resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- definition
-
JSON representation of flow definition.
- errors
-
List of error in the flow definition.
- friendly_name
-
The string that you assigned to describe the Flow.
- links
-
The URLs of the Flow's nested resources.
- revision
-
The latest revision number of the Flow's definition.
- sid
-
The unique string that we created to identify the Flow resource.
- status
-
One of
draftorpublished. - url
-
The absolute URL of the resource.
- valid
-
Boolean if the flow definition is valid.
- warnings
-
List of warnings in the flow definition.
- webhook_url
-
No description in the specification.
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.