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

# Update Instance Ports



## OpenAPI

````yaml api-reference/gpus-v2-spec/update-ports.json PUT /gpus/v2/instances/{instance_id}/ports
openapi: 3.0.0
info:
  title: Novita GPU API v2
  version: 2.0.0
servers:
  - url: https://api.novita.ai
security: []
paths:
  /gpus/v2/instances/{instance_id}/ports:
    put:
      summary: Update Instance Ports
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
          description: 'Allowed value: application/json.'
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: 'Bearer authentication format, e.g.: `Bearer {{API_KEY}}`.'
        - name: instance_id
          in: path
          required: true
          schema:
            type: string
          description: 'Instance ID. String, length: 1-255 characters.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - ports
              properties:
                ports:
                  type: array
                  description: >-
                    Exposed port list. Replaces the entire port set on the
                    instance.
                  items:
                    type: object
                    required:
                      - port
                      - protocol
                    properties:
                      port:
                        type: integer
                        description: 'Port number. Integer, range: [1, 65535].'
                        example: 8080
                      protocol:
                        type: string
                        enum:
                          - tcp
                          - http
                        description: 'Port protocol. Allowed values: `tcp`, `http`.'
                        example: tcp
                  example:
                    - port: 8080
                      protocol: tcp
                    - port: 8888
                      protocol: http
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object

````