---
title: "Replace"
method: PUT
path: "/edges/tcp/{id}/ip_restriction"
tags: ["TCPEdgeIPRestrictionModule"]
---

# Replace

`PUT /edges/tcp/{id}/ip_restriction`

## Path parameters

- `id` string, required

## Headers

- `ngrok-version` integer, required

## Request body

- EdgeIPRestrictionReplace
  - `id` string — n/a
  - `module` EndpointIPPolicyMutate
    - `enabled` boolean — `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified
    - `ip_policy_ids` string[] — list of all IP policies that will be used to check if a source IP is allowed access to the endpoint

## Response `200`

n/a

- EndpointIPPolicy
  - `enabled` boolean — `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified
  - `ip_policies` Ref[] — list of all IP policies that will be used to check if a source IP is allowed access to the endpoint
    - `id` string — a resource identifier
    - `uri` string — a uri for locating a resource

## Other responses

- `4XX` — An error. The body carries a machine-readable error_code and a human-readable msg; every code is documented at https://ngrok.com/docs/errors. A 429 with error code ERR_NGROK_226 means the account exceeded the documented request-rate limit.
- `5XX` — An error. The body carries a machine-readable error_code and a human-readable msg; every code is documented at https://ngrok.com/docs/errors. A 429 with error code ERR_NGROK_226 means the account exceeded the documented request-rate limit.

## Changes

- **2024-10-22** `e40349f8ec6f` — 1 info
  - api operation id `TCPEdgeIPRestrictionModuleReplace` removed and replaced with `TcpEdgeIpRestrictionModuleReplace`

[Change history](https://skmtc.dev/ngrok/apis/ngrok-openapi/changes/edges/tcp/:id/ip_restriction/put.md)

---

[API](https://skmtc.dev/ngrok/apis/ngrok-openapi.md) · [All operations](https://skmtc.dev/ngrok/apis/ngrok-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ngrok/ngrok-openapi/revisions/c697539ac350/schema)
