> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reorder port actions

> Sets a new running order for the actions on an exit. Send every action ID of the exit; the path still continues to the same block afterward.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json put /v1/stable/workflow/{workflowID}/step/{stepID}/link/{portKey}/actions/order
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/workflow/{workflowID}/step/{stepID}/link/{portKey}/actions/order:
    put:
      tags:
        - Workflow
      summary: Reorder port actions
      description: Sets a new running order for the actions on an exit. Send every
        action ID of the exit; the path still continues to the same block
        afterward.
      operationId: StableWorkflowController_reorderActions
      parameters:
        - name: workflowID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the workflow to operate on.
          description: The ID of the workflow to operate on.
        - name: stepID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the step to operate on.
          description: The ID of the step to operate on.
        - name: portKey
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: "The port to operate on: next, fail, else, no-reply, or the ID of a
              branch."
          description: "The port to operate on: next, fail, else, no-reply, or the ID of a
            branch."
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StableWorkflowPortActionsReorderRequest"
      responses:
        "200":
          description: Returns what was written, the exit's step and port, the action IDs
            in their new order, and the block the path reaches after them.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableWorkflowPortActionsOrderResponse"
          x-vf-doc:
            description: Returns what was written, the exit's step and port, the action IDs
              in their new order, and the block the path reaches after them.
      security:
        - token: []
components:
  schemas:
    StableWorkflowPortActionsReorderRequest:
      type: object
      properties:
        order:
          minItems: 2
          maxItems: 20
          type: array
          items:
            type: string
          description: Every action ID of this exit, in the new order.
      required:
        - order
      additionalProperties: false
    StableWorkflowPortActionsOrderResponse:
      type: object
      properties:
        message:
          type: string
          description: What was written.
        stepID:
          type: string
        port:
          type: string
        actions:
          type: array
          items:
            type: string
          description: The action IDs in their new order.
        to:
          nullable: true
          description: The block the path reaches after the actions. Reordering keeps it.
          type: string
      required:
        - message
        - stepID
        - port
        - actions
        - to
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
