kosa8 docs Dashboard
esc
↑ ↓ move↵ openRuns in your browser; nothing you type is sent anywhere.

HTTP API / Egress

Egress

6 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.

Named sets of package-registry hosts for egress allow lists#

GET/v1/egress/presetsscope sandboxes:read
Responses
200401403
curl -s -X GET https://api.kosa8.com/v1/egress/presets \
  -H "Authorization: Bearer $KOSA8_API_KEY"

The egress policy the sandbox runs with#

GET/v1/sandboxes/{id}/egressscope sandboxes:read
Parameters
idrequiredpath · string
Sandbox id (sbx_…)
Responses
200401403404
curl -s -X GET https://api.kosa8.com/v1/sandboxes/$SBX/egress \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Change what the sandbox may reach, at once (a sleeping one when it wakes)#

PUT/v1/sandboxes/{id}/egressscope sandboxes:write

Inside the organization's policy when it enforces one (403 egress_not_allowed otherwise). Connections the new policy refuses stop at their next packet.

Parameters
idrequiredpath · string
Sandbox id (sbx_…)
JSON body
internetboolean
false: nothing leaves but what allow and presets name. Default true when nothing is listed
allowarray of string
Hostnames (exact), *.domain wildcards (any depth below, not the domain), IPv4 addresses or CIDRs
denyarray of string
Refused even where allow covers them. A name is refused at DNS; a CIDR for every packet
presetsarray of "common" | "npm" | "pypi" | "github" | "go" | "crates" | "rubygems" | "maven" …
—
Responses
200400401403404409501502
curl -s -X PUT https://api.kosa8.com/v1/sandboxes/$SBX/egress \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

Back to the organization's default#

DELETE/v1/sandboxes/{id}/egressscope sandboxes:write
Parameters
idrequiredpath · string
Sandbox id (sbx_…)
Responses
200401403404501502
curl -s -X DELETE https://api.kosa8.com/v1/sandboxes/$SBX/egress \
  -H "Authorization: Bearer $KOSA8_API_KEY"

The organization's egress default and whether it is enforced#

GET/v1/org/egressscope sandboxes:read
Responses
200401403
curl -s -X GET https://api.kosa8.com/v1/org/egress \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Set the organization's egress default (enforce: true makes it a ceiling); pushed to running and sleeping sandboxes#

PUT/v1/org/egressscope admin
JSON body
defaultrequiredobject | null
—
enforceboolean
—
Responses
200400401403409
curl -s -X PUT https://api.kosa8.com/v1/org/egress \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

The kosa8 weekly

Agent security news, one industry deep-dive and a hands-on challenge, every Monday. Unsubscribe in one click.

© 2026 kosa8 · kosa8.com · AI Agent Sandbox: Secure and Sovereign for Enterprise · Local models served by llamay · Agent gateway: MAQPNA