メニュー

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

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 PHP format
sid
sid<FN> Not PII

A 34 character string that uniquely identifies this Execution.

accountSid
sid<AC> Not PII

The unique SID identifier of the Account.

flowSid
sid<FW> Not PII

The unique SID identifier of the Flow.

contactSid
sid<FC> Not PII

The unique SID identifier of the Contact.

contactChannelAddress
文字列 PII MTL: 90 DAYS

The phone number, SIP address or Client identifier that triggered this Execution. Phone numbers are in E.164 format (e.g. +16175551212). SIP addresses are formatted as name@company.com. Client identifiers are formatted client:name.

context
オブジェクト Not PII

status
enum:status Not PII

The Status of this Execution. One of active or ended.

dateCreated
date_time<iso8601> Not PII

The date that this Execution was created, given in ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

The date that this Execution was updated, given in ISO 8601 format.

url
url Not PII

The URL of this resource.

links
uri_map Not PII

Contains a dictionary of URL links to nested resources of this Execution.

Create a new execution

post
https://studio.twilio.com/v1/Flows/{FlowSid}/Executions
パラメーター
Names in None format
flow_sid
必須
post sid<FW> Not PII

The unique SID identifier of the Flow.

parameters
オプション
post オブジェクト PII MTL: 90 DAYS

JSON data that will be added to your flow's context and can accessed 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.

to
必須
post phone_number Not PII

The Contact phone number to start a Studio Flow Execution, available as variable {{contact.channel.address}}.

from
必須
post phone_number Not PII

The Twilio phone number to send messages or initiate calls from during the Flow Execution, available as variable {{flow.channel.address}}

例 1
        
        
        
        

        Fetch a single execution

        GET
        https://studio.twilio.com/v1/Flows/{FlowSid}/Executions/{Sid}
        パラメーター
        Names in None format
        flow_sid
        必須
        GET sid<FW> Not PII

        The unique SID identifier of the Flow.

        sid
        必須
        GET sid<FN> Not PII

        The unique SID identifier of the Execution.

        例 1
              
              
              
              

              Read a list of executions

              GET
              https://studio.twilio.com/v1/Flows/{FlowSid}/Executions
              パラメーター
              Names in None format
              flow_sid
              必須
              GET sid<FW> Not PII

              The unique SID identifier of the Flow.

              date_created_from
              オプション
              GET date_time<iso8601> Not PII

              Only show Executions that started on or after this ISO8601 date-time, given as YYYY-MM-DDThh:mm:ss-hh:mm.

              date_created_to
              オプション
              GET date_time<iso8601> Not PII

              Only show Executions that started before this this ISO8601 date-time, given as YYYY-MM-DDThh:mm:ss-hh:mm.

              例 1
                    
                    
                    
                    
                    例 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

                          削除する
                          https://studio.twilio.com/v1/Flows/{FlowSid}/Executions/{Sid}
                          パラメーター
                          Names in None format
                          flow_sid
                          必須
                          削除する sid<FW> Not PII

                          The unique SID identifier of the Flow.

                          sid
                          必須
                          削除する sid<FN> Not PII

                          The unique SID identifier of the Execution.

                          例 1
                                
                                
                                
                                
                                Rate this page:

                                ヘルプが必要ですか?

                                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.