# NetworkPolicy


[API catalog](/reference/api/) · [Docker Sandboxes overview](/reference/api/sandboxes/latest/) · [Product manual](https://docs.docker.com/ai/sandboxes-api/) · [OpenAPI specification](/reference/api/sandboxes/api.yaml)

API version: v1


> This API is experimental. Features, interfaces,
> and behavior may change.




Schema constraints and annotations:

```json
{
  "additionalProperties": false,
  "description": "NetworkPolicy is an inline policy request materialized in the governance plane.",
  "properties": {
    "allowNetworks": {
      "description": "allow_networks are exact network names or CIDRs allowed by this document.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "denyNetworks": {
      "description": "deny_networks are exact network names or CIDRs denied by this document.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "mode": {
      "description": "mode is required and cannot be UNSPECIFIED.",
      "enum": [
        "denyAll"
      ],
      "not": {
        "enum": [
          "unspecified"
        ]
      },
      "title": "NetworkPolicyMode",
      "type": "string"
    }
  },
  "required": [
    "mode"
  ],
  "title": "NetworkPolicy",
  "type": "object"
}
```



