---
title: "Set the default network policy"
description: "Replaces the outbound network policy new computers start with."
canonical: "https://www.cool.computer/docs/api-reference/network/set-the-default-network-policy"
---
# Set the default network policy

> Replaces the outbound network policy new computers start with.

```http
PUT https://api.cool.computer/api/network/default
```

Replaces the outbound network policy new computers start with. Existing computers keep theirs. Callers: an account bearer (API key or access token). The web app may also use its browser session.

## Authorization

- A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

## Request body

Required.

- `application/json` (object): Outbound access policy. open allows public destinations, none blocks outbound access, and allowlist permits only the named public hosts. Private and reserved addresses remain blocked.
  - `mode` ("open" or "none" or "allowlist", required)
  - `allowed_hosts` (array of string, at most 100 items): Required and non-empty only when mode is allowlist. Each value is a hostname, public IP, or leading wildcard such as \*.example.com, without a scheme, port, path, or CIDR.

## Responses

- `200`: The account's default outbound network policy.
  - `application/json` (object)
    - `mode` ("open" or "none" or "allowlist", required)
    - `allowed_hosts` (array of string, at most 100 items): Required and non-empty only when mode is allowlist. Each value is a hostname, public IP, or leading wildcard such as \*.example.com, without a scheme, port, path, or CIDR.
- `400`: Bad Request.
- `401`: Unauthorized.
- `413`: Payload Too Large.
- `429`: Too Many Requests. If the problem code is api_request_rate_exceeded, wait for Retry-After seconds; other problem codes describe a separate limit.
- `500`: Internal Server Error.
- `default`: A machine-readable API error with a stable code and recovery instruction.

An error is an `application/problem+json` document with a stable `code`; [API errors](/docs/api-reference/errors) says how to handle one.

## Example

```sh
curl -X PUT "https://api.cool.computer/api/network/default" \
  -H "authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  --data '{"mode":"open"}'
```
