Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Execution

Pilot

This Twilio product is currently available as a pilot release. Some features are not yet implemented and others may be changed before the product is declared as Generally Available. Pilot and beta products are not covered by a Twilio SLA.


Learn more about how Twilio supports products that are not yet GA.

An Execution represents a specific person’s run through a Flow. An execution is active while the user is in the Flow, and it is considered ended when they stop or are kicked out of the Flow.

HTTP requests to Studio's REST API are protected with HTTP Basic authentication. To learn more about how Twilio handles authentication, please see our security documentation. You will use your Twilio account SID as the username and your auth token as the password for HTTP Basic authentication.

Important: When triggering flows with the API, don't forget to also configure your phone number with your Studio Flow! If you don't configure the phone number, users won't be able to reply to your messages or interact with your IVR.

Execution properties

Names in REST API format
sid
sid<FN> Not PII

account_sid
sid<AC> Not PII

flow_sid
sid<FW> Not PII

contact_channel_address
string Not PII

context
object Not PII

status
enum:status Not PII

date_created
date_time<iso8601> Not PII

date_updated
date_time<iso8601> Not PII

url
url Not PII

links
uri_map Not PII

Create a new execution

post
https://studio.twilio.com/v2/Flows/{FlowSid}/Executions
Parameters
Names in REST API format
flow_sid
Path
post sid<FW> Not PII

to
Required
post phone_number Not PII

from
Required
post phone_number Not PII

parameters
Optional
post object Not PII

Example 1
        
        
        
        
        Example 2
              
              
              
              
              Create a new Execution with JSON data to be added to your flow's context. You will be able to access these parameters as variables inside your Studio flow.

              Create an Execution with custom parameters

              Create a new Execution with JSON data to be added to your flow's context. You will be able to access these parameters as variables inside your Studio flow.

              Fetch a single execution

              get
              https://studio.twilio.com/v2/Flows/{FlowSid}/Executions/{Sid}
              Parameters
              Names in REST API format
              flow_sid
              Path
              get sid<FW> Not PII

              sid
              Path
              get sid<FN> Not PII

              Example 1
                    
                    
                    
                    

                    Read a list of executions

                    get
                    https://studio.twilio.com/v2/Flows/{FlowSid}/Executions

                    Execution resources are listed in reverse chronological order (most recent is first).

                    Parameters
                    Names in REST API format
                    flow_sid
                    Path
                    get sid<FW> Not PII

                    date_created_from
                    Optional
                    get date_time<iso8601> Not PII

                    date_created_to
                    Optional
                    get date_time<iso8601> Not PII

                    Example 1
                          
                          
                          
                          
                          Example 2
                                
                                
                                
                                
                                Executions can be filtered by the date they were created (30-day max range).

                                Read Executions Filtered by Date

                                Executions can be filtered by the date they were created (30-day max range).

                                Delete an execution

                                delete
                                https://studio.twilio.com/v2/Flows/{FlowSid}/Executions/{Sid}
                                Parameters
                                Names in REST API format
                                flow_sid
                                Path
                                delete sid<FW> Not PII

                                sid
                                Path
                                delete sid<FN> Not PII

                                Example 1
                                      
                                      
                                      
                                      
                                      Rate this page:

                                      Need some help?

                                      We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.