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

# Connect two nodes with an edge

> Create an edge between two compatible workflow node ports.



## OpenAPI

````yaml POST /v1/workflows/{id}/edges
openapi: 3.1.0
info:
  title: Magica REST API
  version: 1.0.0
  description: >-
    REST API for managing Magica resources. Authenticate public endpoints with
    your Magica API key: Authorization: Bearer gx_xxx.
servers:
  - url: https://api.magica.com/api
security:
  - bearerAuth: []
paths:
  /v1/workflows/{id}/edges:
    post:
      tags:
        - Public REST
      summary: POST /api/v1/workflows/{id}/edges
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              description: ConnectNodesInputSchema
      responses:
        '201':
          description: Created
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````