---
title: "Set outbound network access"
description: "Replaces the computer's outbound network policy. This does not change public visibility."
canonical: "https://www.cool.computer/docs/api-reference/network/set-outbound-network-access"
---
# Set outbound network access

> Replaces the computer's outbound network policy. This does not change public visibility.

```http
PUT https://api.cool.computer/api/computers/{id}/network
```

Replaces the computer's outbound network policy. This does not change public visibility. In the allowlist and none modes the Cool Computers API and integration_hosts stay allowed; 400 when they and the allowlist together exceed 100 hosts.

## 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.

## Parameters

- `id` (path, string, at least 1 characters, required): The computer's name, such as agent-atlas, or its id (cmp_…). Every caller may use either, the computer's own runtime token included.

## 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 computer's public routing and outbound network settings.
  - `application/json` (object)
    - `id` (string, required)
    - `name` (string, required)
    - `status` (string, required)
    - `url` (string, uri)
    - `visibility` ("public" or "private", required)
    - `port` (integer, 1 to 65535): The port the computer's URL forwards to, while one is exposed.
    - `network_policy` (object, required): 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.
    - `integration_hosts` (array of string, required): Hosts the allowlist and none modes also allow while their provider is connected to the account: each connected harness's API and update hosts, and GitHub's while an installation is active.
    - `warning` (string): Present when the network is not what the policy and connected providers ask for, with what to do next: for example, provider hosts that would push the allowlist past 100 hosts are blocked until allowed hosts are removed or a provider is disconnected.
- `400`: Bad Request.
- `401`: Unauthorized.
- `402`: Payment Required. `pro_required`: VMs need Pro; start Pro with cool billing upgrade, or fix a lapsed subscription with cool billing portal, or use the Account page.
- `403`: Forbidden.
- `404`: Not Found. `computer_not_found`: the computer does not exist or is not yours.
- `409`: Conflict.
- `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/computers/$PARAM_ID/network" \
  -H "authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  --data '{"mode":"open"}'
```
