components:
  securitySchemes:
    accountSid_authToken:
      scheme: basic
      type: http
  schemas:
    studio.v2.flow.execution:
      type: object
      properties:
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the Execution
            resource.
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
            that created the Execution resource.
        flow_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the Flow.
        contact_channel_address:
          type: string
          nullable: true
          description: The phone number, SIP address or Client identifier that triggered
            the 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`.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        context:
          nullable: true
          description: The current state of the Flow's Execution. As a flow executes,
            we save its state in this context. We save data that your widgets can
            access as variables in configuration fields or in text areas as variable
            substitution.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        status:
          $ref: '#/components/schemas/execution_enum_status'
        date_created:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was created specified
            in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was last updated
            specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
        links:
          type: object
          format: uri-map
          nullable: true
          description: The URLs of nested resources.
    execution_enum_status:
      type: string
      enum:
      - active
      - ended
      description: 'The status of the Execution. Can be: `active` or `ended`.'
    studio.v2.flow.execution.execution_context:
      type: object
      properties:
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
            that created the ExecutionContext resource.
        context:
          nullable: true
          description: The current state of the Flow's Execution. As a flow executes,
            we save its state in this context. We save data that your widgets can
            access as variables in configuration fields or in text areas as variable
            substitution.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        flow_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the Flow.
        execution_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the context's Execution resource.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    studio.v2.flow.execution.execution_step:
      type: object
      properties:
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FT[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the ExecutionStep
            resource.
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
            that created the ExecutionStep resource.
        flow_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the Flow.
        execution_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the Step's Execution resource.
        parent_step_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FT[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the parent Step.
        name:
          type: string
          nullable: true
          description: The event that caused the Flow to transition to the Step.
        context:
          nullable: true
          description: The current state of the Flow's Execution. As a flow executes,
            we save its state in this context. We save data that your widgets can
            access as variables in configuration fields or in text areas as variable
            substitution.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        transitioned_from:
          type: string
          nullable: true
          description: The Widget that preceded the Widget for the Step.
        transitioned_to:
          type: string
          nullable: true
          description: The Widget that will follow the Widget for the Step.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was created specified
            in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was last updated
            specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
        links:
          type: object
          format: uri-map
          nullable: true
          description: The URLs of related resources.
    studio.v2.flow.execution.execution_step.execution_step_context:
      type: object
      properties:
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
            that created the ExecutionStepContext resource.
        context:
          nullable: true
          description: The current state of the Flow's Execution. As a flow executes,
            we save its state in this context. We save data that your widgets can
            access as variables in configuration fields or in text areas as variable
            substitution.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        execution_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the context's Execution resource.
        flow_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the Flow.
        step_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FT[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the Step that the context is associated with.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    studio.v2.flow:
      type: object
      properties:
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the Flow resource.
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
            that created the Flow resource.
        friendly_name:
          type: string
          nullable: true
          description: The string that you assigned to describe the Flow.
        definition:
          nullable: true
          description: JSON representation of flow definition.
        status:
          $ref: '#/components/schemas/flow_enum_status'
        revision:
          type: integer
          default: 0
          description: The latest revision number of the Flow's definition.
        commit_message:
          type: string
          nullable: true
          description: Description of change made in the revision.
        valid:
          type: boolean
          nullable: true
          description: Boolean if the flow definition is valid.
        errors:
          type: array
          items: {}
          nullable: true
          description: List of error in the flow definition.
        warnings:
          type: array
          items: {}
          nullable: true
          description: List of warnings in the flow definition.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was created specified
            in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was last updated
            specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        webhook_url:
          type: string
          format: uri
          nullable: true
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
        links:
          type: object
          format: uri-map
          nullable: true
          description: The URLs of the Flow's nested resources.
    flow_enum_status:
      type: string
      enum:
      - draft
      - published
      description: 'The status of the Flow. Can be: `draft` or `published`.'
    studio.v2.flow.flow_revision:
      type: object
      properties:
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the Flow resource.
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
            that created the Flow resource.
        friendly_name:
          type: string
          nullable: true
          description: The string that you assigned to describe the Flow.
        definition:
          nullable: true
          description: JSON representation of flow definition.
        status:
          $ref: '#/components/schemas/flow_revision_enum_status'
        revision:
          type: integer
          default: 0
          description: The latest revision number of the Flow's definition.
        commit_message:
          type: string
          nullable: true
          description: Description of change made in the revision.
        valid:
          type: boolean
          nullable: true
          description: Boolean if the flow definition is valid.
        errors:
          type: array
          items: {}
          nullable: true
          description: List of error in the flow definition.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was created specified
            in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was last updated
            specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    flow_revision_enum_status:
      type: string
      enum:
      - draft
      - published
      description: 'The status of the Flow. Can be: `draft` or `published`.'
    studio.v2.flow_validate:
      type: object
      properties:
        valid:
          type: boolean
          nullable: true
          description: Boolean if the flow definition is valid.
    flow_validate_enum_status:
      type: string
      enum:
      - draft
      - published
    studio.v2.flow.test_user:
      type: object
      properties:
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
          nullable: true
          description: Unique identifier of the flow.
        test_users:
          type: array
          items:
            type: string
          nullable: true
          description: List of test user identities that can test draft versions of
            the flow.
        url:
          type: string
          format: uri
          nullable: true
          description: The URL of this resource.
info:
  title: Twilio - Studio
  description: This is the public Twilio REST API.
  termsOfService: https://www.twilio.com/legal/tos
  contact:
    name: Twilio Support
    url: https://support.twilio.com
    email: support@twilio.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
openapi: 3.0.1
paths:
  /v2/Flows/{FlowSid}/Executions:
    servers:
    - url: https://studio.twilio.com
    description: Executions of Studio flows
    x-twilio:
      defaultOutputProperties:
      - sid
      - status
      - date_created
      dependentProperties:
        steps:
          mapping:
            flow_sid: flow_sid
            execution_sid: sid
          resource_url: /v2/Flows/{flow_sid}/Executions/{execution_sid}/Steps
        execution_context:
          mapping:
            flow_sid: flow_sid
            execution_sid: sid
          resource_url: /v2/Flows/{flow_sid}/Executions/{execution_sid}/Context
      parent: /Flows/{Sid}
      pathType: list
    get:
      description: Retrieve a list of all Executions for the Flow.
      summary: Retrieve a list of all Executions for the Flow.
      tags:
      - StudioV2Execution
      parameters:
      - name: FlowSid
        in: path
        description: The SID of the Flow with the Execution resources to read.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: DateCreatedFrom
        in: query
        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`.
        schema:
          type: string
          format: date-time
      - name: DateCreatedTo
        in: query
        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`.
        schema:
          type: string
          format: date-time
      - name: PageSize
        in: query
        description: How many resources to return in each list page. The default is
          50, and the maximum is 1000.
        schema:
          type: integer
          format: int64
          minimum: 1
          maximum: 1000
      - name: Page
        in: query
        description: The page index. This value is simply for client state.
        schema:
          type: integer
          minimum: 0
      - name: PageToken
        in: query
        description: The page token. This is provided by the API.
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  executions:
                    type: array
                    items:
                      $ref: '#/components/schemas/studio.v2.flow.execution'
                  meta:
                    properties:
                      first_page_url:
                        format: uri
                        type: string
                      key:
                        type: string
                      next_page_url:
                        format: uri
                        nullable: true
                        type: string
                      page:
                        type: integer
                      page_size:
                        type: integer
                      previous_page_url:
                        format: uri
                        nullable: true
                        type: string
                      url:
                        format: uri
                        type: string
                    type: object
                title: ListExecutionResponse
              examples:
                readEmpty:
                  value:
                    meta:
                      previous_page_url: null
                      next_page_url: null
                      url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions?PageSize=50&Page=0
                      page: 0
                      first_page_url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions?PageSize=50&Page=0
                      page_size: 50
                      key: executions
                    executions: []
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListExecution
    post:
      description: Triggers a new Execution for the Flow
      summary: Triggers a new Execution for the Flow
      tags:
      - StudioV2Execution
      parameters:
      - name: FlowSid
        in: path
        description: The SID of the Excecution's Flow.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow.execution'
              examples:
                create:
                  value:
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    sid: FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    flow_sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    context: {}
                    contact_channel_address: '+18001234567'
                    status: active
                    date_created: '2015-07-30T20:00:00Z'
                    date_updated: '2015-07-30T20:00:00Z'
                    links:
                      steps: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps
                      execution_context: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: Created
      security:
      - accountSid_authToken: []
      operationId: CreateExecution
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              title: CreateExecutionRequest
              properties:
                To:
                  type: string
                  format: phone-number
                  description: The Contact phone number to start a Studio Flow Execution,
                    available as variable `{{contact.channel.address}}`.
                From:
                  type: string
                  format: phone-number
                  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.
                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.'
              required:
              - To
              - From
            examples:
              create:
                value:
                  To: '+18001234567'
                  From: '+18007654321'
                  Parameters: '{"first_name":"Foo"}'
                  ExternalId: random_external_id
  /v2/Flows/{FlowSid}/Executions/{Sid}:
    servers:
    - url: https://studio.twilio.com
    description: Executions of Studio flows
    x-twilio:
      defaultOutputProperties:
      - sid
      - status
      - date_created
      dependentProperties:
        steps:
          mapping:
            flow_sid: flow_sid
            execution_sid: sid
          resource_url: /v2/Flows/{flow_sid}/Executions/{execution_sid}/Steps
        execution_context:
          mapping:
            flow_sid: flow_sid
            execution_sid: sid
          resource_url: /v2/Flows/{flow_sid}/Executions/{execution_sid}/Context
      parent: /Flows/{Sid}
      pathType: instance
    get:
      description: Retrieve an Execution
      summary: Retrieve an Execution
      tags:
      - StudioV2Execution
      parameters:
      - name: FlowSid
        in: path
        description: The SID of the Flow with the Execution resource to fetch
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: Sid
        in: path
        description: The SID of the Execution resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow.execution'
              examples:
                fetch:
                  value:
                    sid: FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    flow_sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    contact_channel_address: '+14155555555'
                    status: ended
                    context: {}
                    date_created: '2017-11-06T12:00:00Z'
                    date_updated: null
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    links:
                      steps: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps
                      execution_context: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchExecution
    delete:
      description: Delete the Execution and all Steps relating to it.
      summary: Delete the Execution and all Steps relating to it.
      tags:
      - StudioV2Execution
      parameters:
      - name: FlowSid
        in: path
        description: The SID of the Flow with the Execution resources to delete.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: Sid
        in: path
        description: The SID of the Execution resource to delete.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
        required: true
      responses:
        '204':
          description: The resource was deleted successfully.
      security:
      - accountSid_authToken: []
      operationId: DeleteExecution
    post:
      description: Update the status of an Execution to `ended`.
      summary: Update the status of an Execution to `ended`.
      tags:
      - StudioV2Execution
      parameters:
      - name: FlowSid
        in: path
        description: The SID of the Flow with the Execution resources to update.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: Sid
        in: path
        description: The SID of the Execution resource to update.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow.execution'
              examples:
                update:
                  value:
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    sid: FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    flow_sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    context: {}
                    contact_channel_address: '+14155555555'
                    status: ended
                    date_created: '2017-11-06T12:00:00Z'
                    date_updated: '2017-11-06T12:00:00Z'
                    links:
                      steps: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps
                      execution_context: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: UpdateExecution
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              title: UpdateExecutionRequest
              properties:
                Status:
                  $ref: '#/components/schemas/execution_enum_status'
              required:
              - Status
            examples:
              update:
                value:
                  Status: ended
  /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context:
    servers:
    - url: https://studio.twilio.com
    description: JSON context for executions
    x-twilio:
      defaultOutputProperties:
      - context
      parent: /Flows/{FlowSid}/Executions/{Sid}
      mountName: execution_context
      pathType: instance
    get:
      description: Retrieve the most recent context for an Execution.
      summary: Retrieve the most recent context for an Execution.
      tags:
      - StudioV2ExecutionContext
      parameters:
      - name: FlowSid
        in: path
        description: The SID of the Flow with the Execution context to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: ExecutionSid
        in: path
        description: The SID of the Execution context to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow.execution.execution_context'
              examples:
                fetch:
                  value:
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    context:
                      foo: bar
                    flow_sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    execution_sid: FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchExecutionContext
  /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps:
    servers:
    - url: https://studio.twilio.com
    description: Individual steps within an execution
    x-twilio:
      defaultOutputProperties:
      - sid
      - name
      - date_created
      dependentProperties:
        step_context:
          mapping:
            flow_sid: flow_sid
            execution_sid: execution_sid
            step_sid: sid
          resource_url: /v2/Flows/{flow_sid}/Executions/{execution_sid}/Steps/{step_sid}/Context
      parent: /Flows/{FlowSid}/Executions/{Sid}
      className: execution_step
      pathType: list
    get:
      description: Retrieve a list of all Steps for an Execution.
      summary: Retrieve a list of all Steps for an Execution.
      tags:
      - StudioV2ExecutionStep
      parameters:
      - name: FlowSid
        in: path
        description: The SID of the Flow with the Steps to read.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: ExecutionSid
        in: path
        description: The SID of the Execution with the Steps to read.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
        required: true
      - name: PageSize
        in: query
        description: How many resources to return in each list page. The default is
          50, and the maximum is 1000.
        schema:
          type: integer
          format: int64
          minimum: 1
          maximum: 1000
      - name: Page
        in: query
        description: The page index. This value is simply for client state.
        schema:
          type: integer
          minimum: 0
      - name: PageToken
        in: query
        description: The page token. This is provided by the API.
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  steps:
                    type: array
                    items:
                      $ref: '#/components/schemas/studio.v2.flow.execution.execution_step'
                  meta:
                    properties:
                      first_page_url:
                        format: uri
                        type: string
                      key:
                        type: string
                      next_page_url:
                        format: uri
                        nullable: true
                        type: string
                      page:
                        type: integer
                      page_size:
                        type: integer
                      previous_page_url:
                        format: uri
                        nullable: true
                        type: string
                      url:
                        format: uri
                        type: string
                    type: object
                title: ListExecutionStepResponse
              examples:
                readEmpty:
                  value:
                    meta:
                      previous_page_url: null
                      next_page_url: null
                      url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0
                      page: 0
                      first_page_url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0
                      page_size: 50
                      key: steps
                    steps: []
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListExecutionStep
  /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}:
    servers:
    - url: https://studio.twilio.com
    description: Individual steps within an execution
    x-twilio:
      defaultOutputProperties:
      - sid
      - name
      - date_created
      dependentProperties:
        step_context:
          mapping:
            flow_sid: flow_sid
            execution_sid: execution_sid
            step_sid: sid
          resource_url: /v2/Flows/{flow_sid}/Executions/{execution_sid}/Steps/{step_sid}/Context
      parent: /Flows/{FlowSid}/Executions/{Sid}
      className: execution_step
      pathType: instance
    get:
      description: Retrieve a Step.
      summary: Retrieve a Step.
      tags:
      - StudioV2ExecutionStep
      parameters:
      - name: FlowSid
        in: path
        description: The SID of the Flow with the Step to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: ExecutionSid
        in: path
        description: The SID of the Execution resource with the Step to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
        required: true
      - name: Sid
        in: path
        description: The SID of the ExecutionStep resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FT[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow.execution.execution_step'
              examples:
                fetch:
                  value:
                    sid: FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    flow_sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    execution_sid: FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    name: incomingRequest
                    context: {}
                    parent_step_sid: FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    transitioned_from: Trigger
                    transitioned_to: Ended
                    date_created: '2017-11-06T12:00:00Z'
                    date_updated: null
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    links:
                      step_context: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchExecutionStep
  /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context:
    servers:
    - url: https://studio.twilio.com
    description: JSON context for an individual step within an execution
    x-twilio:
      defaultOutputProperties:
      - context
      parent: /Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}
      mountName: step_context
      className: execution_step_context
      pathType: instance
    get:
      description: Retrieve the context for an Execution Step.
      summary: Retrieve the context for an Execution Step.
      tags:
      - StudioV2ExecutionStepContext
      parameters:
      - name: FlowSid
        in: path
        description: The SID of the Flow with the Step to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: ExecutionSid
        in: path
        description: The SID of the Execution resource with the Step to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FN[0-9a-fA-F]{32}$
        required: true
      - name: StepSid
        in: path
        description: The SID of the Step to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FT[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow.execution.execution_step.execution_step_context'
              examples:
                fetch:
                  value:
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    context:
                      foo: bar
                    flow_sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    execution_sid: FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    step_sid: FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchExecutionStepContext
  /v2/Flows:
    servers:
    - url: https://studio.twilio.com
    description: Studio flows
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - status
      - revision
      dependentProperties:
        revisions:
          mapping:
            sid: sid
          resource_url: /v2/Flows/{sid}/Revisions
        test_users:
          mapping:
            sid: sid
          resource_url: /v2/Flows/{sid}/TestUsers
        executions:
          mapping:
            flow_sid: sid
          resource_url: /v2/Flows/{flow_sid}/Executions
      pathType: list
    post:
      description: Create a Flow.
      summary: Create a Flow.
      tags:
      - StudioV2Flow
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow'
              examples:
                create:
                  value:
                    sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    definition:
                      initial_state: Trigger
                    friendly_name: Test Flow
                    status: published
                    revision: 1
                    commit_message: null
                    valid: true
                    errors: []
                    warnings: []
                    webhook_url: http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    date_created: '2017-11-06T12:00:00Z'
                    date_updated: null
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    links:
                      test_users: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers
                      revisions: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Revisions
                      executions: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: Created
      security:
      - accountSid_authToken: []
      operationId: CreateFlow
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              title: CreateFlowRequest
              properties:
                FriendlyName:
                  type: string
                  description: The string that you assigned to describe the Flow.
                Status:
                  $ref: '#/components/schemas/flow_enum_status'
                Definition:
                  description: JSON representation of flow definition.
                CommitMessage:
                  type: string
                  description: Description of change made in the revision.
              required:
              - FriendlyName
              - Status
              - Definition
            examples:
              create:
                value:
                  FriendlyName: Test Flow
                  Status: published
                  Definition: '{"initial_state": "Trigger"}'
    get:
      description: Retrieve a list of all Flows.
      summary: Retrieve a list of all Flows.
      tags:
      - StudioV2Flow
      parameters:
      - name: PageSize
        in: query
        description: How many resources to return in each list page. The default is
          50, and the maximum is 1000.
        schema:
          type: integer
          format: int64
          minimum: 1
          maximum: 1000
      - name: Page
        in: query
        description: The page index. This value is simply for client state.
        schema:
          type: integer
          minimum: 0
      - name: PageToken
        in: query
        description: The page token. This is provided by the API.
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  flows:
                    type: array
                    items:
                      $ref: '#/components/schemas/studio.v2.flow'
                  meta:
                    properties:
                      first_page_url:
                        format: uri
                        type: string
                      key:
                        type: string
                      next_page_url:
                        format: uri
                        nullable: true
                        type: string
                      page:
                        type: integer
                      page_size:
                        type: integer
                      previous_page_url:
                        format: uri
                        nullable: true
                        type: string
                      url:
                        format: uri
                        type: string
                    type: object
                title: ListFlowResponse
              examples:
                readEmpty:
                  value:
                    meta:
                      previous_page_url: null
                      next_page_url: null
                      url: https://studio.twilio.com/v2/Flows?PageSize=50&Page=0
                      page: 0
                      first_page_url: https://studio.twilio.com/v2/Flows?PageSize=50&Page=0
                      page_size: 50
                      key: flows
                    flows:
                    - sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                      account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                      friendly_name: Test Flow
                      status: published
                      revision: 1
                      definition: null
                      commit_message: null
                      valid: null
                      errors: null
                      warnings: null
                      webhook_url: http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                      date_created: '2017-11-06T12:00:00Z'
                      date_updated: '2017-11-06T12:00:00Z'
                      url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                      links:
                        test_users: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers
                        revisions: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Revisions
                        executions: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListFlow
  /v2/Flows/{Sid}:
    servers:
    - url: https://studio.twilio.com
    description: Studio flows
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - status
      - revision
      dependentProperties:
        revisions:
          mapping:
            sid: sid
          resource_url: /v2/Flows/{sid}/Revisions
        test_users:
          mapping:
            sid: sid
          resource_url: /v2/Flows/{sid}/TestUsers
        executions:
          mapping:
            flow_sid: sid
          resource_url: /v2/Flows/{flow_sid}/Executions
      pathType: instance
    post:
      description: Update a Flow.
      summary: Update a Flow.
      tags:
      - StudioV2Flow
      parameters:
      - name: Sid
        in: path
        description: The SID of the Flow resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow'
              examples:
                update:
                  value:
                    sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    definition:
                      initial_state: Trigger
                    friendly_name: Test Flow
                    status: published
                    revision: 1
                    commit_message: null
                    valid: true
                    errors: []
                    warnings: []
                    webhook_url: http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    date_created: '2017-11-06T12:00:00Z'
                    date_updated: '2017-11-06T12:00:00Z'
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    links:
                      test_users: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers
                      revisions: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Revisions
                      executions: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: UpdateFlow
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              title: UpdateFlowRequest
              properties:
                Status:
                  $ref: '#/components/schemas/flow_enum_status'
                FriendlyName:
                  type: string
                  description: The string that you assigned to describe the Flow.
                Definition:
                  description: JSON representation of flow definition.
                CommitMessage:
                  type: string
                  description: Description of change made in the revision.
              required:
              - Status
            examples:
              update:
                value:
                  FriendlyName: Test Flow
                  Status: published
                  Definition: '{"initial_state": "Trigger"}'
    get:
      description: Retrieve a specific Flow.
      summary: Retrieve a specific Flow.
      tags:
      - StudioV2Flow
      parameters:
      - name: Sid
        in: path
        description: The SID of the Flow resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow'
              examples:
                fetch:
                  value:
                    sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    friendly_name: Test Flow
                    definition:
                      initial_state: Trigger
                    status: published
                    revision: 1
                    commit_message: commit
                    valid: true
                    errors: []
                    warnings: []
                    webhook_url: http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    date_created: '2017-11-06T12:00:00Z'
                    date_updated: null
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    links:
                      test_users: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers
                      revisions: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Revisions
                      executions: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchFlow
    delete:
      description: Delete a specific Flow.
      summary: Delete a specific Flow.
      tags:
      - StudioV2Flow
      parameters:
      - name: Sid
        in: path
        description: The SID of the Flow resource to delete.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      responses:
        '204':
          description: The resource was deleted successfully.
      security:
      - accountSid_authToken: []
      operationId: DeleteFlow
  /v2/Flows/{Sid}/Revisions:
    servers:
    - url: https://studio.twilio.com
    description: Studio flows revisions
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - status
      - revision
      parent: /Flows/{Sid}
      className: flow_revision
      pathType: list
    get:
      description: Retrieve a list of all Flows revisions.
      summary: Retrieve a list of all Flows revisions.
      tags:
      - StudioV2FlowRevision
      parameters:
      - name: Sid
        in: path
        description: The SID of the Flow resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: PageSize
        in: query
        description: How many resources to return in each list page. The default is
          50, and the maximum is 1000.
        schema:
          type: integer
          format: int64
          minimum: 1
          maximum: 1000
      - name: Page
        in: query
        description: The page index. This value is simply for client state.
        schema:
          type: integer
          minimum: 0
      - name: PageToken
        in: query
        description: The page token. This is provided by the API.
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revisions:
                    type: array
                    items:
                      $ref: '#/components/schemas/studio.v2.flow.flow_revision'
                  meta:
                    properties:
                      first_page_url:
                        format: uri
                        type: string
                      key:
                        type: string
                      next_page_url:
                        format: uri
                        nullable: true
                        type: string
                      page:
                        type: integer
                      page_size:
                        type: integer
                      previous_page_url:
                        format: uri
                        nullable: true
                        type: string
                      url:
                        format: uri
                        type: string
                    type: object
                title: ListFlowRevisionResponse
              examples:
                readEmpty:
                  value:
                    meta:
                      previous_page_url: null
                      next_page_url: null
                      url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Revisions?PageSize=50&Page=0
                      page: 0
                      first_page_url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Revisions?PageSize=50&Page=0
                      page_size: 50
                      key: revisions
                    revisions:
                    - sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                      account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                      friendly_name: Test Flow
                      status: published
                      revision: 1
                      definition: null
                      commit_message: null
                      valid: null
                      errors: null
                      date_created: '2017-11-06T12:00:00Z'
                      date_updated: '2017-11-06T12:00:00Z'
                      url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Revisions/1
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListFlowRevision
  /v2/Flows/{Sid}/Revisions/{Revision}:
    servers:
    - url: https://studio.twilio.com
    description: Studio flows revisions
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - status
      - revision
      parent: /Flows/{Sid}
      className: flow_revision
      pathType: instance
    get:
      description: Retrieve a specific Flow revision.
      summary: Retrieve a specific Flow revision.
      tags:
      - StudioV2FlowRevision
      parameters:
      - name: Sid
        in: path
        description: The SID of the Flow resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      - name: Revision
        in: path
        description: Specific Revision number or can be `LatestPublished` and `LatestRevision`.
        schema:
          type: string
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow.flow_revision'
              examples:
                fetch:
                  value:
                    sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    definition:
                      initial_state: Trigger
                    friendly_name: Test Flow
                    status: published
                    revision: 1
                    commit_message: null
                    valid: true
                    errors: []
                    date_created: '2017-11-06T12:00:00Z'
                    date_updated: null
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Revisions/1
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchFlowRevision
  /v2/Flows/Validate:
    servers:
    - url: https://studio.twilio.com
    description: Flow definition validator
    x-twilio:
      defaultOutputProperties:
      - valid
      mountName: flow_validate
      pathType: list
    post:
      description: Validate flow JSON definition
      summary: Validate flow JSON definition
      tags:
      - StudioV2FlowValidate
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow_validate'
              examples:
                update:
                  value:
                    valid: true
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: UpdateFlowValidate
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              title: UpdateFlowValidateRequest
              properties:
                FriendlyName:
                  type: string
                  description: The string that you assigned to describe the Flow.
                Status:
                  $ref: '#/components/schemas/flow_validate_enum_status'
                Definition:
                  description: JSON representation of flow definition.
                CommitMessage:
                  type: string
                  description: Description of change made in the revision.
              required:
              - FriendlyName
              - Status
              - Definition
            examples:
              update:
                value:
                  FriendlyName: Test Flow
                  Status: published
                  Definition: '{"initial_state": "Trigger"}'
  /v2/Flows/{Sid}/TestUsers:
    servers:
    - url: https://studio.twilio.com
    description: Test users of a flow
    x-twilio:
      defaultOutputProperties:
      - test_users
      parent: /Flows/{Sid}
      className: flow_test_user
      pathType: instance
    get:
      description: Fetch flow test users
      summary: Fetch flow test users
      tags:
      - StudioV2FlowTestUser
      parameters:
      - name: Sid
        in: path
        description: Unique identifier of the flow.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow.test_user'
              examples:
                fetch:
                  value:
                    sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    test_users:
                    - user1
                    - user2
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchTestUser
    post:
      description: Update flow test users
      summary: Update flow test users
      tags:
      - StudioV2FlowTestUser
      parameters:
      - name: Sid
        in: path
        description: Unique identifier of the flow.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^FW[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio.v2.flow.test_user'
              examples:
                update:
                  value:
                    sid: FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    test_users:
                    - user1
                    - user2
                    url: https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
          description: OK
      security:
      - accountSid_authToken: []
      operationId: UpdateTestUser
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              title: UpdateTestUserRequest
              properties:
                TestUsers:
                  type: array
                  items:
                    type: string
                  description: List of test user identities that can test draft versions
                    of the flow.
              required:
              - TestUsers
            examples:
              update:
                value:
                  TestUsers:
                  - user1
                  - user2
servers:
- url: https://studio.twilio.com
tags:
- name: StudioV2Application
- name: StudioV2Execution
- name: StudioV2ExecutionContext
- name: StudioV2ExecutionStep
- name: StudioV2ExecutionStepContext
- name: StudioV2Flow
- name: StudioV2FlowRevision
- name: StudioV2FlowTestUser
- name: StudioV2FlowValidate
- name: StudioV2Version
security:
- accountSid_authToken: []
