---
title: "PUT /api/v3/accounts/{account_id}/ip-restrictions/{id}"
method: PUT
path: "/api/v3/accounts/{account_id}/ip-restrictions/{id}"
tags: ["IP Restriction Endpoints"]
---

# PUT /api/v3/accounts/{account_id}/ip-restrictions/{id}

`PUT /api/v3/accounts/{account_id}/ip-restrictions/{id}`

## Request

- Base URL: `https://cloud.getdbt.com`
- URL: `https://cloud.getdbt.com/api/v3/accounts/{account_id}/ip-restrictions/{id}`
- Auth: HTTP bearer

Update an existing ip restriction rule

Note: As long as at least one cidr was successfully saved a 2XX will be returned.
Check the `extra` key within the response for a list of cidrs that failed to save.

## Path parameters

- `account_id` integer, required
- `id` integer, required

## Request body

- UpdateIPRestrictionRequestRequest
  - `name` string, required
  - `type` 1 | 2, required: * `1` - ALLOW * `2` - DENY
  - `rule_set_enabled` boolean, required
  - `account_id` integer, required
  - `cidrs` IPRestrictionCidrRequestRequest[], required
    - `state` integer: A value of 1 means this entity is active and a value of 2 means this entity is deleted
    - `cidr` string, required
    - `id` integer
  - `description` string
  - `id` integer, required

## Response `200`

- IPRestrictionRule
  - `name` string, required
  - `type` integer, required
  - `state` integer, required: A value of 1 means this entity is active and a value of 2 means this entity is deleted
  - `ip_restriction_rule_set_id` integer, required
  - `rule_set_enabled` boolean, required
  - `account_id` integer, required
  - `cidrs` IPRestrictionCidr[]
    - `state` integer, required: A value of 1 means this entity is active and a value of 2 means this entity is deleted
    - `ip_restriction_rule_id` integer, required
    - `enabled` boolean, required
    - `cidr` string, required
    - `cidr_ipv6` string
  - `created_by_id` integer
  - `created_by_service_token_id` integer
  - `description` string

## Changes

- **2026-10-06** (v3) `fac88ef7e8f8`: 9 breaking
  - the `account_id` request property format changed from no format to `int64` (media type: application/json)
  - the `account_id` request property format changed from no format to `int64` (media type: application/x-www-form-urlencoded)
  - the `account_id` request property format changed from no format to `int64` (media type: multipart/form-data)
  - the `cidrs/items/id` request property format changed from no format to `int64` (media type: application/json)
  - …5 more
- **2026-10-06** (v3) `7d5c1b4c8d8a`: 2 breaking
  - for the `path` request parameter `account_id`, the format changed from no format to `int64`
  - for the `path` request parameter `id`, the format changed from no format to `int64`

[Operation history](https://skmtc.dev/getdbt/apis/dbt-cloud-api-v2/changes/api/v3/accounts/:account_id/ip-restrictions/:id/put.md)

---

[API](https://skmtc.dev/getdbt/apis/dbt-cloud-api-v2.md) - [All operations](https://skmtc.dev/getdbt/apis/dbt-cloud-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/getdbt/apis/dbt-cloud-api-v2/revisions/2448b375ac2f?raw)
