components: schemas: studio.v2.flow: properties: account_sid: description: The SID of the Account that created the resource maxLength: 34 minLength: 34 nullable: true pattern: ^AC[0-9a-fA-F]{32}$ type: string commit_message: description: Description of change made in the revision nullable: true type: string date_created: description: The ISO 8601 date and time in GMT when the resource was created format: date-time nullable: true type: string date_updated: description: The ISO 8601 date and time in GMT when the resource was last updated format: date-time nullable: true type: string definition: description: JSON representation of flow definition nullable: true type: object errors: description: List of error in the flow definition items: type: object nullable: true type: array friendly_name: description: The string that you assigned to describe the Flow nullable: true type: string links: description: Nested resource URLs nullable: true type: object revision: description: The latest revision number of the Flow's definition nullable: true type: integer sid: description: The unique string that identifies the resource maxLength: 34 minLength: 34 nullable: true pattern: ^FW[0-9a-fA-F]{32}$ type: string status: description: The status of the Flow enum: - draft - published nullable: true type: string url: description: The absolute URL of the resource format: uri nullable: true type: string valid: description: Boolean if the flow definition is valid nullable: true type: boolean warnings: description: List of warnings in the flow definition items: type: object nullable: true type: array webhook_url: format: uri nullable: true type: string type: object studio.v2.flow.execution: properties: account_sid: description: The SID of the Account that created the resource maxLength: 34 minLength: 34 nullable: true pattern: ^AC[0-9a-fA-F]{32}$ type: string contact_channel_address: description: The phone number, SIP address or Client identifier that triggered the Execution nullable: true type: string context: description: The current state of the flow nullable: true type: object date_created: description: The ISO 8601 date and time in GMT when the resource was created format: date-time nullable: true type: string date_updated: description: The ISO 8601 date and time in GMT when the resource was last updated format: date-time nullable: true type: string flow_sid: description: The SID of the Flow maxLength: 34 minLength: 34 nullable: true pattern: ^FW[0-9a-fA-F]{32}$ type: string links: description: Nested resource URLs nullable: true type: object sid: description: The unique string that identifies the resource maxLength: 34 minLength: 34 nullable: true pattern: ^FN[0-9a-fA-F]{32}$ type: string status: description: The status of the Execution enum: - active - ended nullable: true type: string url: description: The absolute URL of the resource format: uri nullable: true type: string type: object studio.v2.flow.execution.execution_context: properties: account_sid: description: The SID of the Account that created the resource maxLength: 34 minLength: 34 nullable: true pattern: ^AC[0-9a-fA-F]{32}$ type: string context: description: The current state of the flow nullable: true type: object execution_sid: description: The SID of the Execution maxLength: 34 minLength: 34 nullable: true pattern: ^FN[0-9a-fA-F]{32}$ type: string flow_sid: description: The SID of the Flow maxLength: 34 minLength: 34 nullable: true pattern: ^FW[0-9a-fA-F]{32}$ type: string url: description: The absolute URL of the resource format: uri nullable: true type: string type: object studio.v2.flow.execution.execution_step: properties: account_sid: description: The SID of the Account that created the resource maxLength: 34 minLength: 34 nullable: true pattern: ^AC[0-9a-fA-F]{32}$ type: string context: description: The current state of the flow nullable: true type: object date_created: description: The ISO 8601 date and time in GMT when the resource was created format: date-time nullable: true type: string date_updated: description: The ISO 8601 date and time in GMT when the resource was last updated format: date-time nullable: true type: string execution_sid: description: The SID of the Execution maxLength: 34 minLength: 34 nullable: true pattern: ^FN[0-9a-fA-F]{32}$ type: string flow_sid: description: The SID of the Flow maxLength: 34 minLength: 34 nullable: true pattern: ^FW[0-9a-fA-F]{32}$ type: string links: description: The URLs of related resources nullable: true type: object name: description: The event that caused the Flow to transition to the Step nullable: true type: string sid: description: The unique string that identifies the resource maxLength: 34 minLength: 34 nullable: true pattern: ^FT[0-9a-fA-F]{32}$ type: string transitioned_from: description: The Widget that preceded the Widget for the Step nullable: true type: string transitioned_to: description: The Widget that will follow the Widget for the Step nullable: true type: string url: description: The absolute URL of the resource format: uri nullable: true type: string type: object studio.v2.flow.execution.execution_step.execution_step_context: properties: account_sid: description: The SID of the Account that created the resource maxLength: 34 minLength: 34 nullable: true pattern: ^AC[0-9a-fA-F]{32}$ type: string context: description: The current state of the flow nullable: true type: object execution_sid: description: The SID of the Execution maxLength: 34 minLength: 34 nullable: true pattern: ^FN[0-9a-fA-F]{32}$ type: string flow_sid: description: The SID of the Flow maxLength: 34 minLength: 34 nullable: true pattern: ^FW[0-9a-fA-F]{32}$ type: string step_sid: description: Step SID maxLength: 34 minLength: 34 nullable: true pattern: ^FT[0-9a-fA-F]{32}$ type: string url: description: The absolute URL of the resource format: uri nullable: true type: string type: object studio.v2.flow.flow_revision: properties: account_sid: description: The SID of the Account that created the resource maxLength: 34 minLength: 34 nullable: true pattern: ^AC[0-9a-fA-F]{32}$ type: string commit_message: description: Description of change made in the revision nullable: true type: string date_created: description: The ISO 8601 date and time in GMT when the resource was created format: date-time nullable: true type: string date_updated: description: The ISO 8601 date and time in GMT when the resource was last updated format: date-time nullable: true type: string definition: description: JSON representation of flow definition nullable: true type: object errors: description: List of error in the flow definition items: type: object nullable: true type: array friendly_name: description: The string that you assigned to describe the Flow nullable: true type: string revision: description: The latest revision number of the Flow's definition nullable: true type: integer sid: description: The unique string that identifies the resource maxLength: 34 minLength: 34 nullable: true pattern: ^FW[0-9a-fA-F]{32}$ type: string status: description: The status of the Flow enum: - draft - published nullable: true type: string url: description: The absolute URL of the resource format: uri nullable: true type: string valid: description: Boolean if the flow definition is valid nullable: true type: boolean type: object studio.v2.flow.test_user: properties: sid: description: Unique identifier of the flow. maxLength: 34 minLength: 34 nullable: true pattern: ^FW[0-9a-fA-F]{32}$ type: string test_users: description: List of test user identities that can test draft versions of the flow. items: type: string nullable: true type: array url: description: The URL of this resource. format: uri nullable: true type: string type: object studio.v2.flow_validate: properties: valid: description: Boolean if the flow definition is valid nullable: true type: boolean type: object securitySchemes: accountSid_authToken: scheme: basic type: http info: contact: email: support@twilio.com name: Twilio Support url: https://support.twilio.com description: This is the public Twilio REST API. license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html termsOfService: https://www.twilio.com/legal/tos title: Twilio - Studio version: 1.27.0 openapi: 3.0.1 paths: /v2/Flows: description: Studio flows get: description: Retrieve a list of all Flows. operationId: ListFlow parameters: - description: How many resources to return in each list page. The default is 50, and the maximum is 1000. in: query name: PageSize schema: maximum: 1000 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: flows: items: $ref: '#/components/schemas/studio.v2.flow' type: array meta: properties: first_page_url: format: uri type: string key: type: string next_page_url: format: uri type: string page: type: integer page_size: type: integer previous_page_url: format: uri type: string url: format: uri type: string type: object title: ListFlowResponse type: object description: OK security: - accountSid_authToken: [] x-maturity: - GA post: description: Create a Flow. operationId: CreateFlow requestBody: content: application/x-www-form-urlencoded: schema: properties: CommitMessage: description: Description of change made in the revision. type: string Definition: description: JSON representation of flow definition. type: object FriendlyName: description: The string that you assigned to describe the Flow. type: string Status: description: 'The status of the Flow. Can be: `draft` or `published`.' enum: - draft - published type: string required: - FriendlyName - Status - Definition title: CreateFlowRequest type: object responses: '201': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow' description: Created security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - sid - friendly_name - status - revision pathType: list /v2/Flows/Validate: description: Flow definition validator post: description: Validate flow JSON definition operationId: UpdateFlowValidate requestBody: content: application/x-www-form-urlencoded: schema: properties: CommitMessage: description: Description of change made in the revision. type: string Definition: description: JSON representation of flow definition. type: object FriendlyName: description: The string that you assigned to describe the Flow. type: string Status: description: 'The status of the Flow. Can be: `draft` or `published`.' enum: - draft - published type: string required: - FriendlyName - Status - Definition title: UpdateFlowValidateRequest type: object responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow_validate' description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - valid pathType: list /v2/Flows/{FlowSid}/Executions: description: Executions of Studio flows get: description: Retrieve a list of all Executions for the Flow. operationId: ListExecution parameters: - description: The SID of the Flow with the Execution resources to read. in: path name: FlowSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. in: query name: DateCreatedFrom schema: format: date-time type: string - description: Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. in: query name: DateCreatedTo schema: format: date-time type: string - description: How many resources to return in each list page. The default is 50, and the maximum is 1000. in: query name: PageSize schema: maximum: 1000 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: executions: items: $ref: '#/components/schemas/studio.v2.flow.execution' type: array meta: properties: first_page_url: format: uri type: string key: type: string next_page_url: format: uri type: string page: type: integer page_size: type: integer previous_page_url: format: uri type: string url: format: uri type: string type: object title: ListExecutionResponse type: object description: OK security: - accountSid_authToken: [] x-maturity: - GA post: description: Triggers a new Execution for the Flow operationId: CreateExecution parameters: - description: The SID of the Excecution's Flow. in: path name: FlowSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string requestBody: content: application/x-www-form-urlencoded: schema: properties: From: description: 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. type: string Parameters: description: '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.' type: object To: description: The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. type: string required: - To - From title: CreateExecutionRequest type: object responses: '201': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow.execution' description: Created security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - sid - status - date_created pathType: list /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context: description: JSON context for executions get: description: Retrieve the most recent context for an Execution. operationId: FetchExecutionContext parameters: - description: The SID of the Flow with the Execution context to fetch. in: path name: FlowSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: The SID of the Execution context to fetch. in: path name: ExecutionSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FN[0-9a-fA-F]{32}$ type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow.execution.execution_context' description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - context pathType: instance /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps: description: Individual steps within an execution get: description: Retrieve a list of all Steps for an Execution. operationId: ListExecutionStep parameters: - description: The SID of the Flow with the Steps to read. in: path name: FlowSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: The SID of the Execution with the Steps to read. in: path name: ExecutionSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FN[0-9a-fA-F]{32}$ type: string - description: How many resources to return in each list page. The default is 50, and the maximum is 1000. in: query name: PageSize schema: maximum: 1000 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: meta: properties: first_page_url: format: uri type: string key: type: string next_page_url: format: uri type: string page: type: integer page_size: type: integer previous_page_url: format: uri type: string url: format: uri type: string type: object steps: items: $ref: '#/components/schemas/studio.v2.flow.execution.execution_step' type: array title: ListExecutionStepResponse type: object description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - sid - name - date_created pathType: list /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}: description: Individual steps within an execution get: description: Retrieve a Step. operationId: FetchExecutionStep parameters: - description: The SID of the Flow with the Step to fetch. in: path name: FlowSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: The SID of the Execution resource with the Step to fetch. in: path name: ExecutionSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FN[0-9a-fA-F]{32}$ type: string - description: The SID of the ExecutionStep resource to fetch. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FT[0-9a-fA-F]{32}$ type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow.execution.execution_step' description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - sid - name - date_created pathType: instance /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context: description: JSON context for an individual step within an execution get: description: Retrieve the context for an Execution Step. operationId: FetchExecutionStepContext parameters: - description: The SID of the Flow with the Step to fetch. in: path name: FlowSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: The SID of the Execution resource with the Step to fetch. in: path name: ExecutionSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FN[0-9a-fA-F]{32}$ type: string - description: The SID of the Step to fetch. in: path name: StepSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FT[0-9a-fA-F]{32}$ type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow.execution.execution_step.execution_step_context' description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - context pathType: instance /v2/Flows/{FlowSid}/Executions/{Sid}: delete: description: Delete the Execution and all Steps relating to it. operationId: DeleteExecution parameters: - description: The SID of the Flow with the Execution resources to delete. in: path name: FlowSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: The SID of the Execution resource to delete. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FN[0-9a-fA-F]{32}$ type: string responses: '204': description: The resource was deleted successfully. security: - accountSid_authToken: [] x-maturity: - GA description: Executions of Studio flows get: description: Retrieve an Execution operationId: FetchExecution parameters: - description: The SID of the Flow with the Execution resource to fetch in: path name: FlowSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: The SID of the Execution resource to fetch. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FN[0-9a-fA-F]{32}$ type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow.execution' description: OK security: - accountSid_authToken: [] x-maturity: - GA post: description: Update the status of an Execution to `ended`. operationId: UpdateExecution parameters: - description: The SID of the Flow with the Execution resources to update. in: path name: FlowSid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: The SID of the Execution resource to update. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FN[0-9a-fA-F]{32}$ type: string requestBody: content: application/x-www-form-urlencoded: schema: properties: Status: description: The status of the Execution. Can only be `ended`. enum: - active - ended type: string required: - Status title: UpdateExecutionRequest type: object responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow.execution' description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - sid - status - date_created pathType: instance /v2/Flows/{Sid}: delete: description: Delete a specific Flow. operationId: DeleteFlow parameters: - description: The SID of the Flow resource to delete. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string responses: '204': description: The resource was deleted successfully. security: - accountSid_authToken: [] x-maturity: - GA description: Studio flows get: description: Retrieve a specific Flow. operationId: FetchFlow parameters: - description: The SID of the Flow resource to fetch. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow' description: OK security: - accountSid_authToken: [] x-maturity: - GA post: description: Update a Flow. operationId: UpdateFlow parameters: - description: The SID of the Flow resource to fetch. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string requestBody: content: application/x-www-form-urlencoded: schema: properties: CommitMessage: description: Description of change made in the revision. type: string Definition: description: JSON representation of flow definition. type: object FriendlyName: description: The string that you assigned to describe the Flow. type: string Status: description: 'The status of the Flow. Can be: `draft` or `published`.' enum: - draft - published type: string required: - Status title: UpdateFlowRequest type: object responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow' description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - sid - friendly_name - status - revision pathType: instance /v2/Flows/{Sid}/Revisions: description: Studio flows revisions get: description: Retrieve a list of all Flows revisions. operationId: ListFlowRevision parameters: - description: The SID of the Flow resource to fetch. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: How many resources to return in each list page. The default is 50, and the maximum is 1000. in: query name: PageSize schema: maximum: 1000 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: meta: properties: first_page_url: format: uri type: string key: type: string next_page_url: format: uri type: string page: type: integer page_size: type: integer previous_page_url: format: uri type: string url: format: uri type: string type: object revisions: items: $ref: '#/components/schemas/studio.v2.flow.flow_revision' type: array title: ListFlowRevisionResponse type: object description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - sid - friendly_name - status - revision pathType: list /v2/Flows/{Sid}/Revisions/{Revision}: description: Studio flows revisions get: description: Retrieve a specific Flow revision. operationId: FetchFlowRevision parameters: - description: The SID of the Flow resource to fetch. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string - description: Specific Revision number or can be `LatestPublished` and `LatestRevision`. in: path name: Revision required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow.flow_revision' description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - sid - friendly_name - status - revision pathType: instance /v2/Flows/{Sid}/TestUsers: description: Test users of a flow get: description: Fetch flow test users operationId: FetchTestUser parameters: - description: Unique identifier of the flow. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow.test_user' description: OK security: - accountSid_authToken: [] x-maturity: - GA post: description: Update flow test users operationId: UpdateTestUser parameters: - description: Unique identifier of the flow. in: path name: Sid required: true schema: maxLength: 34 minLength: 34 pattern: ^FW[0-9a-fA-F]{32}$ type: string requestBody: content: application/x-www-form-urlencoded: schema: properties: TestUsers: description: List of test user identities that can test draft versions of the flow. items: type: string type: array required: - TestUsers title: UpdateTestUserRequest type: object responses: '200': content: application/json: schema: $ref: '#/components/schemas/studio.v2.flow.test_user' description: OK security: - accountSid_authToken: [] x-maturity: - GA servers: - url: https://studio.twilio.com x-twilio: defaultOutputProperties: - test_users pathType: instance servers: - url: https://studio.twilio.com x-maturity: - description: This product is Generally Available. name: GA