Triggers a new Execution for the Flow
Executions of Studio flows
Triggers a new Execution for the Flow
Path parameters
-
The SID of the Excecution's Flow.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^FW[0-9a-fA-F]{32}$
.
Body
-
The Contact phone number to start a Studio Flow Execution, available as variable
{{contact.channel.address}}
. -
The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable
{{flow.channel.address}}
. For SMS, this can also be a Messaging Service SID. -
JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in
Parameters={"name":"Zeke"}
, a widget in your Flow can reference the variable{{flow.data.name}}
, which returns "Zeke". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string.
curl \
--request POST 'https://studio.twilio.com/v1/Flows/{FlowSid}/Executions' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'To=%2B18001234567&From=%2B18007654321&Parameters=%7B%22first_name%22%3A%22Foo%22%7D'
{"To"=>"+18001234567", "From"=>"+18007654321", "Parameters"=>"{\"first_name\":\"Foo\"}"}
{
"sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps",
"execution_context": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
},
"status": "active",
"context": {},
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"contact_channel_address": "+18001234567"
}