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

# Update a port

> Updates a specific port



## OpenAPI

````yaml put /api/models/{modelId}/ports/{portId}
openapi: 3.0.0
info:
  title: Dalus Public API Documentation
  version: 1.0.0
  description: Public API documentation for Dalus application
servers:
  - url: http://localhost:3000
    description: Dalus API Server
security:
  - bearerAuth: []
tags:
  - name: models
    description: AI model management endpoints
  - name: models/requirements
    description: Requirements management for models
  - name: models/actions
    description: Action management for models
  - name: models/parts
    description: Part management for models
  - name: models/states
    description: State management for models
  - name: models/transitions
    description: Transition relationship management for models
  - name: models/signals
    description: Signal relationship management for models
  - name: models/interfaces
    description: Interface relationship management for models
  - name: models/ports
    description: Port management for models
paths:
  /api/models/{modelId}/ports/{portId}:
    put:
      tags:
        - models/ports
      summary: Update a port
      description: Updates a specific port
      parameters:
        - name: modelId
          in: path
          required: true
          description: ID of the model
          schema:
            type: string
            format: uuid
        - name: portId
          in: path
          required: true
          description: ID of the port
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: string
                  description: The label of the port
                partId:
                  type: string
                  description: The ID of the part this port belongs to
                constraints:
                  type: array
                  items:
                    type: string
                  description: The constraints on the port
      responses:
        '200':
          description: Port updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Port'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '404':
          description: Port not found
        '500':
          description: Server error
components:
  schemas:
    Port:
      type: object
      properties:
        label:
          type: string
          description: The label of the part
        constraints:
          type: array
          items:
            type: string
          description: The constraints on the port
        notes:
          type: string
          description: Additional notes about the port
      required:
        - label
        - constraints
      description: A port belonging to a part in the model
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````