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

# Update

> Updates a TCP Edge by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.




## OpenAPI

````yaml https://raw.githubusercontent.com/ngrok/ngrok-openapi/refs/heads/main/ngrok.yaml patch /edges/tcp/{id}
openapi: 3.0.0
info:
  title: ngrok OpenAPI
  version: 1.0.0
servers:
  - url: https://api.ngrok.com
security:
  - authentication: []
paths:
  /edges/tcp/{id}:
    patch:
      tags:
        - EdgesTCP
      summary: Update
      description: >
        Updates a TCP Edge by ID. If a module is not specified in the update, it
        will not be modified. However, each module configuration that is
        specified will completely replace the existing value. There is no way to
        delete an existing module via this API, instead use the delete module
        API.
      operationId: EdgesTcpUpdate
      parameters:
        - $ref: '#/components/parameters/ngrokVersion'
        - name: id
          description: |
            unique identifier of this edge
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TCPEdgeUpdate'
      responses:
        '200':
          description: >
            Updates a TCP Edge by ID. If a module is not specified in the
            update, it will not be modified. However, each module configuration
            that is specified will completely replace the existing value. There
            is no way to delete an existing module via this API, instead use the
            delete module API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TCPEdge'
components:
  parameters:
    ngrokVersion:
      name: ngrok-version
      in: header
      required: true
      schema:
        type: integer
        default: 2
  schemas:
    TCPEdgeUpdate:
      type: object
      properties:
        id:
          description: |
            unique identifier of this edge
          type: string
        description:
          description: >
            human-readable description of what this edge will be used for;
            optional, max 255 bytes.
          type: string
        metadata:
          description: >
            arbitrary user-defined machine-readable data of this edge. Optional,
            max 4096 bytes.
          type: string
        hostports:
          description: |
            hostports served by this edge
          type: array
          items:
            type: string
        backend:
          $ref: '#/components/schemas/EndpointBackendMutate'
          description: |
            edge modules
        ip_restriction:
          $ref: '#/components/schemas/EndpointIPPolicyMutate'
          description: n/a
        traffic_policy:
          $ref: '#/components/schemas/EndpointTrafficPolicy'
          description: |
            the traffic policy associated with this edge or null
    TCPEdge:
      type: object
      properties:
        id:
          description: |
            unique identifier of this edge
          type: string
        description:
          description: >
            human-readable description of what this edge will be used for;
            optional, max 255 bytes.
          type: string
        metadata:
          description: >
            arbitrary user-defined machine-readable data of this edge. Optional,
            max 4096 bytes.
          type: string
        created_at:
          description: |
            timestamp when the edge was created, RFC 3339 format
          type: string
        uri:
          description: |
            URI of the edge API resource
          type: string
        hostports:
          description: |
            hostports served by this edge
          type: array
          items:
            type: string
        backend:
          $ref: '#/components/schemas/EndpointBackend'
          description: |
            edge modules
        ip_restriction:
          $ref: '#/components/schemas/EndpointIPPolicy'
          description: n/a
        traffic_policy:
          $ref: '#/components/schemas/EndpointTrafficPolicy'
          description: |
            the traffic policy associated with this edge or null
    EndpointBackendMutate:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        backend_id:
          description: |
            backend to be used to back this endpoint
          type: string
    EndpointIPPolicyMutate:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        ip_policy_ids:
          description: >
            list of all IP policies that will be used to check if a source IP is
            allowed access to the endpoint
          type: array
          items:
            type: string
    EndpointTrafficPolicy:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        value:
          description: >
            the traffic policy that should be applied to the traffic on your
            endpoint.
          type: string
    EndpointBackend:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        backend:
          $ref: '#/components/schemas/Ref'
          description: |
            backend to be used to back this endpoint
    EndpointIPPolicy:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        ip_policies:
          description: >
            list of all IP policies that will be used to check if a source IP is
            allowed access to the endpoint
          type: array
          items:
            $ref: '#/components/schemas/Ref'
    Ref:
      type: object
      properties:
        id:
          description: |
            a resource identifier
          type: string
        uri:
          description: |
            a uri for locating a resource
          type: string
  securitySchemes:
    authentication:
      type: http
      scheme: bearer

````