Triggers a new Engagement for the Flow
[DEPRECATED] Excecutions of Studio flows
Triggers a new Engagement for the Flow
Path parameters
-
The SID of the 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 Engagement, available as variable
{{contact.channel.address}}
. -
The Twilio phone number to send messages or initiate calls from during the Flow Engagement. Available as variable
{{flow.channel.address}}
-
A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in
Parameters={'name':'Zeke'}
then inside a widget you can reference the variable{{flow.data.name}}
which will return the string '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 your JSON string.
curl \
--request POST 'https://studio.twilio.com/v1/Flows/{FlowSid}/Engagements' \
--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/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps",
"engagement_context": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/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"
}