# Platform administrators only: allow or stop an organization extending the outbound allowlist (revoking keeps its patterns but stops enforcing them), and give or take back open egress (any public host the deny list allows, reads and writes). Omitted fields keep their value.

Source: <https://everruns.com/docs/api/operations/set_org_egress_allowlist_grant/>

PUT

/v1/orgs/{org}/egress-allowlist/grant

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/orgs/example/egress-allowlist/grant';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: '{"granted":true,"open":true}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request PUT \
  --url https://app.everruns.com/api/v1/orgs/example/egress-allowlist/grant \
  --header 'Content-Type: application/json' \
  --data '{ "granted": true, "open": true }'
```

* Production APIapp.everruns.com/api/v1/orgs/{org}/egress-allowlist/grant

## Parameters

### Path Parameters

**org**

required

string

Prefixed public identifier

## Request Bodyrequired

Media typeapplication/json

Body of `PUT /v1/orgs/{org}/egress-allowlist/grant`. Omitted fields keep their current value; at least one is required.

object

**granted**

Allow (`true`) or stop (`false`) this organization extending the allowlist. Revoking keeps its patterns but stops enforcing them.

boolean | null

**open**

Give (`true`) or take back (`false`) open egress: any public host the deny list allows, reads and writes.

boolean | null

##### Examplegenerated

```json
{
  "granted": true,
  "open": true
}
```

## Responses

### 200

Success

Media typeapplication/json

An organization’s egress allowlist extension.

object

**can\_edit**

required

Whether the caller may edit the patterns (an organization admin; the edit also needs `granted`).

boolean

**can\_grant**

required

Whether the caller may grant or revoke (a platform administrator).

boolean

**granted**

required

Whether a platform administrator allowed this organization to extend the deployment’s outbound allowlist. Patterns are enforced only while this is true.

boolean

**max\_patterns**

required

Most patterns one organization may add.

integer

**mode**

required

The deployment’s egress policy: `open`, `curated-writes`, or `curated-all`. Extensions only matter in a curated mode.

string

**open**

required

Whether a platform administrator granted this organization open egress: its agents reach any public host the deny list allows, for reads and writes, whatever the deployment’s curated policy.

boolean

**patterns**

required

Host patterns this organization adds to the allowlist: `example.com`, `*.example.com`, or an `https://example.com/path/` prefix.

Array\<string>

##### Example

```json
{
  "mode": "curated-writes"
}
```

### 400

Neither granted nor open given

### 403

Platform user access required

### 404

Organization not found