> ## 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.

# Link many ports

> Points up to 50 ports at blocks in one write. Every link is checked before anything is saved, and they save together; a port that led elsewhere now leads to the new block and keeps its actions.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json put /v1/stable/workflow/{workflowID}/links
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}/links:
    put:
      tags:
        - Workflow
      summary: Link many ports
      description: Points up to 50 ports at blocks in one write. Every link is checked
        before anything is saved, and they save together; a port that led
        elsewhere now leads to the new block and keeps its actions.
      operationId: StableWorkflowController_linkMany
      parameters:
        - name: workflowID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the workflow that holds the ports.
          description: The ID of the workflow that holds the ports.
        - 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/StableWorkflowLinkManyRequest"
      responses:
        "200":
          description: Returns a message and, for each port in the order sent, the block
            it led to before.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableWorkflowLinkManyResponse"
          x-vf-doc:
            description: Returns a message and, for each port in the order sent, the block
              it led to before.
      security:
        - token: []
components:
  schemas:
    StableWorkflowLinkManyRequest:
      type: object
      properties:
        links:
          minItems: 1
          maxItems: 50
          type: array
          items:
            type: object
            properties:
              stepID:
                type: string
                description: The step that owns the port, or entry.stepID for the Start.
              port:
                type: string
                description: "The port key: next, else, fail, no-reply, conversation-turn, or
                  the ID of a branch or path."
              toBlockID:
                type: string
                description: The block the port will lead to. Links point at blocks, never at a
                  step.
            required:
              - stepID
              - port
              - toBlockID
            additionalProperties: false
          description: 1 to 50 ports to link, each once.
      required:
        - links
      additionalProperties: false
    StableWorkflowLinkManyResponse:
      type: object
      properties:
        message:
          type: string
          description: What was written.
        linked:
          type: array
          items:
            $ref: "#/components/schemas/StableWorkflowLinkedExit"
          description: Every port in the order you sent them, with the block it led to
            before.
      required:
        - message
        - linked
    StableWorkflowLinkedExit:
      type: object
      properties:
        stepID:
          type: string
          description: The step that owns the port, or the start node.
        port:
          type: string
        to:
          type: string
          description: The block the port leads to now.
        replaced:
          nullable: true
          description: "What the port led to before this call, after any actions: a block,
            or a step an older link stored. null when it led nowhere. When it is
            neither null nor to, the port no longer leads there: tell the user."
          type: string
      required:
        - stepID
        - port
        - to
        - replaced
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
