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

# POST /api/v3/accounts/{account_id}/ip-restrictions/

`POST /api/v3/accounts/{account_id}/ip-restrictions/`

## Request

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

Save net-new 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

## Request body

- IPRestrictionRequestRequest
  - `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

## Response `200`

- IPRestrictionRuleEnveloped
  - `data` IPRestrictionRuleResponse, required
    - `id` integer, required
    - `name` string
    - `type` integer
    - `state` integer: 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
    - `rule_set_enabled` boolean
    - `account_id` integer
    - `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
    - `enabled_for_service_tokens` boolean, required
    - `description` string
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `status` ResponseStatus, required
    - `code` integer: HTTP status code
    - `is_success` boolean, required: Whether the request was successful or not
    - `user_message` string, required: End-user friendly success or error message
    - `developer_message` string, required: Developer friendly success or error message

## Changes

- **2026-10-06** (v3) `fac88ef7e8f8`: 6 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)
  - …2 more
- **2026-10-06** (v3) `7d5c1b4c8d8a`: 1 breaking
  - for the `path` request parameter `account_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/post.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)
